def METHOD_NAME(args, command, params):
    """
    Run the command. This could be either over the CLI or the API.
    Here we run over the API either using `rclone rc --loopback` which
    is useful for making sure state is saved properly or to an
    existing rclone rcd if `--rc` is used on the command line.
    """
    if args.rc:
        import requests
        kwargs = {
            "json": params,
        }
        if args.user:
            kwargs["auth"] = (args.user, args.password)
        r = requests.post('http://localhost:5572/'+command, **kwargs)
        if r.status_code != 200:
            raise ValueError(f"RC command failed: Error {r.status_code}: {r.text}")
        return r.json()
    cmd = ["rclone", "-vv", "rc", "--loopback", command, "--json", json.dumps(params)]
    result = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
    return json.loads(result.stdout)