def __parse_attribute_or_label_name(name: str) -> str:
    """
    Parses the name of an attribute or label and removes forbidden characters.

    :param name:    The name of the attribute or label
    :return:        The parsed name
    """
    name = name.strip()
    if name.startswith('\'') or name.startswith('\"'):
        name = name[1:]
    if name.endswith('\'') or name.endswith('\"'):
        name = name[:(len(name) - 1)]
    return name.replace('\\\'', '\'').replace('\\\"', '\"')