def __func_alias__(hub):
    """
    Create functions on the hub at this location for common request objects
    """
    aliases = {}
    for method in ("delete", "get", "head", "post", "patch"):
        aliases[method] = _get_caller(hub, method=method)

    return aliases


def _get_caller(hub, method: str):
    async def _request(ctx, ref: str, org_id: str = None, **kwargs):
        """
        Make an authenticated csp request with a url built for a specific org_id
        :param ctx: The profile information generated by the acct plugin (is implicitly passed to exec modules and state modules)
        :param ref: The rest of the url path that follows the "org_id"
        :param org_id: Use this org_id if explicitly passed; fall back to the default in acct profile
        :param kwargs: Any args to pass to the underlying requests library
        :return: The result of the request
        """
        org_id = org_id or ctx.acct.default_org_id
        func = getattr(hub.tool.csp.authed, method.lower())
        return await func(ctx, ref=f"orgs/{org_id}/{ref}", **kwargs,)

    return _request
