def parse_sparse_fields(type_=None):
 fields = dict(((key[7:(-1)], set(value.split(','))) for (key, value) in request.args.items() if (key.startswith('fields[') and key.endswith(']'))))
 return (fields.get(type_) if (type_ is not None) else fields)

def parse_sparse_fields ( type_ = None ) : fields = dict ( ( ( key [ 7 : ( - 1 ) ] , set ( value . split ( ',' ) ) ) for ( key , value ) in request . args . items ( ) if ( key . startswith ( 'fields[' ) and key . endswith ( ']' ) ) ) ) return ( fields . get ( type_ ) if ( type_ is not None ) else fields )
get the sparse fields as requested by the client .