def _get_params(method, fields, params=None):
    """
    Separate the params into their location types.
    """
    if params is None:
        return empty_params

    field_map = {field.name: field for field in fields}

    path = {}
    query = {}
    headers = {}
    body = None
    data = {}
    files = {}

    for key, value in params.items():
        if key not in field_map or not field_map[key].location:
            # Default is 'query' for 'GET' and 'DELETE', and 'form' for others.
            location = 'query' if ('GET', 'DELETE') in method else 'form'
        else:
            location = field_map[key].location

        if location == 'path':
            path[key] = value
        elif location == 'query':
            query[key] = value
        elif location == 'header':
            headers[key] = value
        elif location == 'body':
            body = value
        elif location == 'form':
            if is_file(value):
                files[key] = value
            else:
                data[key] = value

    return Params(path, query, headers, body, data, files)
dataset/ETHPy150Open core-api/python-client/coreapi/transports/http.py/_get_params/swapped operands of `in`