code: def get_item(env, name, default=None):
    
    # TODO: handle attributes
    for key in name.split('.'):
      if isinstance(env, dict) and key in env:
        env = env[key]
      elif isinstance(env, types.ModuleType) and key in env.__dict__:
        env = env.__dict__[key]
      else:
        return default
    return env
docs: Get an item from a dictionary, handling nested lookups with dotted notation.
  
    Args:
      env: the environment (dictionary) to use to look up the name.
      name: the name to look up, in dotted notation.
      default: the value to return if the name if not found.
  
    Returns:
      The result of looking up the name, if found; else the default.