@staticmethod
def grant_privileges_commands(rolename: str, schema: str, read_write: bool
    ) ->list:
    """Creates commands for granting privileges for accessing database objects to a role/user"""
    x_role = '"' + rolename + '"'
    x_schema = '"' + schema + '"'
    statements = list()
    statements.append(' '.join(['GRANT USAGE ON SCHEMA', x_schema, 'TO',
        x_role]))
    statements.append(' '.join(['GRANT SELECT ON ALL SEQUENCES IN SCHEMA',
        x_schema, 'TO', x_role]))
    statements.append(' '.join(['GRANT SELECT ON ALL TABLES IN SCHEMA',
        x_schema, 'TO', x_role]))
    if read_write:
        statements.append(' '.join([
            'GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA', x_schema, 'TO',
            x_role]))
        statements.append(' '.join([
            'GRANT USAGE ON ALL SEQUENCES IN SCHEMA', x_schema, 'TO', x_role]))
        statements.append(' '.join(['GRANT INSERT ON ALL TABLES IN SCHEMA',
            x_schema, 'TO', x_role]))
        if not schema.startswith('audit'):
            statements.append(' '.join([
                'GRANT UPDATE ON ALL TABLES IN SCHEMA', x_schema, 'TO',
                x_role]))
            statements.append(' '.join([
                'GRANT DELETE ON ALL TABLES IN SCHEMA', x_schema, 'TO',
                x_role]))
    return statements
