code: def references_json(references):
      ''' Given a list of all models in a graph, return JSON representing
      them and their properties.
  
      Args:
          references (seq[Model]) :
              A list of models to convert to JSON
  
      Returns:
          list
  
      '''
  
      references_json = []
      for r in references:
          ref = r.ref
          ref['attributes'] = r._to_json_like(include_defaults=False)
          references_json.append(ref)
  
      return references_jsof references_json(references):
      ''' Given a list of all models in a graph, return JSON representing
      them and their properties.
  
      Args:
          references (seq[Model]) :
              A list of models to convert to JSON
  
      Returns:
          list
  
      '''
  
      references_json = []
      for r in references:
          ref = r.ref
          ref['attributes'] = r._to_json_like(include_defaults=False)
          references_json.append(ref)
  
      return references_json
docs: Given a list of all models in a graph, return JSON representing
      them and their properties.
  
      Args:
          references (seq[Model]) :
              A list of models to convert to JSON
  
      Returns:
          list