code: def get_uniquely_named_objects_by_name(object_list):
      
      if not object_list:
          return dict()
  
      result = dict()
      for obj in object_list:
          name = obj.name.value
          if name in result:
              raise GraphQLCompilationError(u'Found duplicate object key: '
                                            u'{} {}'.format(name, object_list))
          result[name] = obj
  
      return result
docs: Return dict of name -> object pairs from a list of objects with unique names.
  
      Args:
          object_list: list of objects, each X of which has a unique name accessible as X.name.value
  
      Returns:
          dict, { X.name.value: X for x in object_list }
          If the list is empty or None, returns an empty dict.