input: Write a function to create an environment object that can execute and analyze Python code, including predefined global variables and functions, and additional global variables. The environment should execute Python code, analyze it for variable usage and imports, and capture and display output from executed code using a stdout object. The function should return an instance of the Environment class with a specified path.
  
  assert create_environment('/path/to/code')==Environment('/path/to/code')
  assert create_environment('/another/path')==Environment('/another/path')
  assert create_environment('/empty/path')==Environment('/empty/path')
  assert create_environment('/')==Environment('/')
  assert create_environment('')==Environment('')
output: def create_environment(path):
      return Environment(path)