def METHOD_NAME(project_id, integration):
    with pg_client.PostgresClient() as cur:
        cur.execute(
            cur.mogrify(
                """\
                SELECT integrations.* 
                FROM public.integrations INNER JOIN public.projects USING(project_id)
                WHERE provider = %(provider)s 
                    AND project_id = %(project_id)s
                    AND projects.deleted_at ISNULL
                LIMIT 1;""",
                {"project_id": project_id, "provider": integration})
        )
        r = cur.fetchone()
    return helper.dict_to_camel_case(helper.flatten_nested_dicts(r))