input: Write a python function to retrieve the attributes from a feature layer given a query and fields.
  ```python
  def get_attributes(layer, query="1=1", fields="*"):
      """Get all attributes for a record in a table"""
      vals = layer.query(where=query, out_fields=fields, returnGeometry=False)
      valsdict = featureset_to_dict(vals)
      return valsdict['features'][0]['attributes']
  
  assert get_attributes(mock_layer, query="1=1", fields="*") == mock_attributes
  assert get_attributes(mock_layer, query="name='John'", fields="name,age") == mock_attributes_filtered
output: def featureset_to_dict(featureset):
      return featureset
  
  def get_attributes(layer, query="1=1", fields="*"):
      """Get all attributes for a record in a table"""
      vals = layer.query(where=query, out_fields=fields, returnGeometry=False)
      valsdict = featureset_to_dict(vals)
      return valsdict['features'][0]['attributes']