def METHOD_NAME(rsa_private_key, scopes=None, write=False, azp=False, add_claims=True, exp=3600, overrides=None):
    """Generate the access token with the given parameters"""
    if scopes is None:
        scopes = []
    header = {"typ": "JWT", "alg": "RS512"}
    protocol = "http"
    host = get_default_ip()
    if CONFIG.ENABLE_HTTPS:
        protocol = "https"
        host = get_mocks_hostname()
    payload = {"iss": "{}://{}".format(protocol, host),
               "sub": "test@{}".format(CONFIG.DNS_DOMAIN),
               "aud": ["{}://*.{}".format(protocol, CONFIG.DNS_DOMAIN), "{}://*.local".format(protocol)],
               "exp": int(time.time() + exp),
               "iat": int(time.time()),
               "scope": " ".join(scopes)}
    if azp:
        payload["azp"] = str(uuid.uuid4())
    else:
        payload["client_id"] = str(uuid.uuid4())
    nmos_claims = {}
    if add_claims:
        for api in scopes:
            nmos_claims["x-nmos-{}".format(api)] = {"read": ["*"]}
            if write:
                nmos_claims["x-nmos-{}".format(api)]["write"] = ["*"]
    payload.update(nmos_claims)
    if overrides:
        payload.update(overrides)
    token = jwt.encode(header, payload, rsa_private_key).decode()
    return token