import re


def create_human_readable_label(text_name):
    """
    Args:
        text_name: An unstructured/free-text name for a table field.
    Returns:
        A human readable label adhering to a naming convention which is basically
        space-separated words and prohibition of certain characters. A space is
        inserted before capital letters in some situations, as exemplified in
        "FOVSizeX" becoming "FOV Size X".
    """
    label = text_name
    label = re.sub('[\s\-\_]+', ' ', label)
    label = re.sub('(?<=[a-z0-9])([A-Z])', ' \\1', label)
    return label