def METHOD_NAME(inspector, metadata, table: str, name_dict, tables):
    _rename_fks(inspector, table, table_mapping)
    new_table_name: str = name_dict.get(table, '')
    if new_table_name:
        _rename_indexes(inspector, new_table_name, table)
        _rename_pk(inspector, new_table_name, table)
        _rename_sequence(metadata, new_table_name, table)
        _rename_table(table, new_table_name)
        versioned_table_name = _suffix_version(table)
        if versioned_table_name in tables:
            versioned_table_new_name = _suffix_version(new_table_name)
            _rename_indexes(inspector, versioned_table_new_name, versioned_table_name)
            _rename_table(versioned_table_name, versioned_table_new_name)