def _path_to_name(path, prefix = None, suffix = None):
    """Converts a path string to a name suitable for use as a label name.

    Args:
        path: A path as a `string`.
        prefix: Optional. A string which will be prefixed to the namified
                path with an underscore separating the prefix.
        suffix: Optional. A `string` which will be appended to the namified
                path with an underscore separating the suffix.

    Returns:
        A `string` suitable for use as a label name.
    """
    prefix_str = ""
    if prefix != None:
        prefix_str = prefix + "_" if not prefix.endswith("_") else prefix
    suffix_str = ""
    if suffix != None:
        suffix_str = "_" + suffix if not suffix.startswith("_") else suffix
    return prefix_str + path.replace("/", "_").replace(".", "_") + suffix_str