nodes: 0, module; 1, function_definition; 2, function_name:load_remotes; 3, parameters; 4, block; 5, default_parameter; 6, default_parameter; 7, expression_statement; 8, import_from_statement; 9, try_statement; 10, if_statement; 11, identifier:extra_path; 12, None; 13, identifier:load_user; 14, True; 15, comment:"""Load the YAML remotes file, which sort of combines the Accounts file with part of the
      remotes sections from the main config
  
      :return: An `AttrDict`
      """; 16, dotted_name; 17, dotted_name; 18, block; 19, except_clause; 20, boolean_operator; 21, block; 22, else_clause; 23, identifier:os; 24, identifier:path; 25, identifier:getmtime; 26, expression_statement; 27, identifier:ConfigurationError; 28, block; 29, comparison_operator:remotes_file is not None; 30, call; 31, expression_statement; 32, expression_statement; 33, if_statement; 34, expression_statement; 35, return_statement; 36, block; 37, assignment; 38, expression_statement; 39, identifier:remotes_file; 40, None; 41, attribute; 42, argument_list; 43, assignment; 44, call; 45, not_operator; 46, block; 47, assignment; 48, identifier:config; 49, return_statement; 50, identifier:remotes_file; 51, call; 52, assignment; 53, attribute; 54, identifier:exists; 55, identifier:remotes_file; 56, identifier:config; 57, call; 58, attribute; 59, argument_list; 60, comparison_operator:'remotes' in config; 61, expression_statement; 62, attribute; 63, list; 64, None; 65, identifier:find_config_file; 66, argument_list; 67, identifier:remotes_file; 68, None; 69, identifier:os; 70, identifier:path; 71, identifier:AttrDict; 72, argument_list; 73, identifier:config; 74, identifier:update_yaml; 75, identifier:remotes_file; 76, string; 77, identifier:config; 78, assignment; 79, attribute; 80, identifier:loaded; 81, identifier:remotes_file; 82, call; 83, identifier:REMOTES_FILE; 84, keyword_argument; 85, keyword_argument; 86, string_content:remotes; 87, attribute; 88, call; 89, identifier:config; 90, identifier:remotes; 91, identifier:getmtime; 92, argument_list; 93, identifier:extra_path; 94, identifier:extra_path; 95, identifier:load_user; 96, identifier:load_user; 97, identifier:config; 98, identifier:remotes; 99, identifier:AttrDict; 100, argument_list; 101, identifier:remotes_file
code: def load_remotes(extra_path=None, load_user=True):
      """Load the YAML remotes file, which sort of combines the Accounts file with part of the
      remotes sections from the main config
  
      :return: An `AttrDict`
      """
  
      from os.path import getmtime
  
      try:
          remotes_file = find_config_file(REMOTES_FILE, extra_path=extra_path, load_user=load_user)
      except ConfigurationError:
          remotes_file = None
  
  
      if remotes_file is not None and os.path.exists(remotes_file):
          config = AttrDict()
          config.update_yaml(remotes_file)
  
          if not 'remotes' in config:
              config.remotes = AttrDict()
  
          config.remotes.loaded = [remotes_file, getmtime(remotes_file)]
  
          return config
      else:
          return None