def _is_main_name(param: str, extra_filter=None) -> bool:
    """
    TensorFlow follows a rough naming convention, this checks if the param follows it

    :param param: The attribute name

    :param extra_filter: Any additional filter to run
    :type extra_filter: Optional[Callable[[AnyStr], bool]]

    :return: Whether it is a 'main' name
    """
    return (
        not param.startswith("_")
        and "_" not in param
        and not param.islower()
        and not param.isupper()
        and (extra_filter is None or extra_filter(param))
    )