def _esc(name: str) ->str:
    """
    Escape altair field names that contain a dot.

    Dots, i.e. ".", in field names are interpreted as hierachical access,
    but quite often they are not.

    Examples:
        >>> _esc("foo.bar") == "foo\\\\.bar"
        True
        >>> _esc("foo_bar") == "foo_bar"
        True

    """
    return name.replace('.', '\\.')
