def METHOD_NAME(
    cloud_mode: bool,
    cloud_base_url: str | None,
    cloud_access_token: str | None,
    cloud_organization_id: str | None,
) -> GXCloudConfig | None:
    if not cloud_mode:
        return None
    cloud_config = CloudDataContext.get_cloud_config(
        cloud_base_url=cloud_base_url,
        cloud_access_token=cloud_access_token,
        cloud_organization_id=cloud_organization_id,
    )
    return cloud_config