def _format_params(cols, fields, where, crs, precision):
    """
    Transform parameters into a query input for ESRIs feature service:
    The feature service allows users to query & edit feature geoms & attributes

    A breakdown of the ESRIs feature service:
        https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm

    Parameters
    ----------
    cols: str or list (default: 'all')
        str list of columns or attributes to include
    fields: list
        list of fields supported by the boundary
    where : str
        sql like statement to filter geometries and attributes
    crs : int (default: British National Grid)
        epsg codes to transform and extract geometries
    precision: int
         number of digits past the decimal point are to be used

    Returns
    -------
    dict:
        dictionary containing query inputs for ESRIs feature service
    """

    if isinstance(cols, str):
        cols = cols.lower()
        if cols == "all":
            cols = "*"

    if isinstance(cols, list):
        cols = [col.lower() for col in cols]

        if all(elem in fields for elem in cols) is not True:
            raise ValueError(f"Only {fields} are supported for geometry type")
        cols = ", ".join(cols)

    return {
        "outFields": f"{cols}",
        "where": f"{where}",
        "outSR": crs,
        "f": "geojson",
        "geometryPrecision": f"{precision}",
    }