import re


def create_auxiliary_table_name(field_name, table_name):
    """
    Args:
        field_name: A table field whose value identifies a record in a foreign
        table.
        table_name: The table containing the field field_name.
    Returns:
        A conventional name for the foreign table. Some whitespace and
        special-character stripping is enforced.
    """
    if not re.search('^' + table_name, field_name):
        composite = table_name + ' ' + field_name
    else:
        composite = field_name
    return re.sub('[\s\-\_]+', '_', composite).lower()