Fundamentals of legislation for autonomous artificial intelligence systems