def get_pgstattuple_schema_name(curs):
    """
    Getting the schema where the pgstattuple extension is installed
    """
    query = """
        select 
            n.nspname::text,
            e.extversion::numeric
        from pg_catalog.pg_extension e
        join pg_catalog.pg_namespace as n on 
            n.oid = e.extnamespace
        where 
            e.extname = 'pgstattuple'
    """

    curs.execute(query)

    try:
        r = curs.fetchone()
        return [r[0], r[1]]
    except:
        return [None, None]