old_contents: from hoerapi.errors import MissingAttributeError, InvalidDataError
  
  
  def parser_list(clazz, data):
      items = []
  
      if isinstance(data, list):
          for item in data:
              items.append(parser_object(clazz, item))
      else:
          raise InvalidDataError('not an array')
  
      return items
  
  
  def parser_object(clazz, data):
      try:
          return clazz(data)
      except KeyError as e:
          raise MissingAttributeError(e)
new_contents: from hoerapi.errors import MissingAttributeError, InvalidDataError
  
  
  def parser_list(clazz, data):
      if isinstance(data, list):
          return [parser_object(clazz, item) for item in data]
      else:
          raise InvalidDataError('not an array')
  
  
  def parser_object(clazz, data):
      try:
          return clazz(data)
      except KeyError as e:
          raise MissingAttributeError(e)
subject: use list comprehension in parser_list