Merge configuration files from a ``KUBECONFIG`` environment variable.

    :param bytes kubeconfigs: A value like the one given to ``KUBECONFIG`` to
        specify multiple configuration files.

    :return KubeConfig: A configuration object which has merged all of the
        configuration from the specified configuration files.  Merging is
        performed according to
        https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#merging-kubeconfig-files

def _merge_configs_from_env(kubeconfigs):
    """
    Merge configuration files from a ``KUBECONFIG`` environment variable.

    :param bytes kubeconfigs: A value like the one given to ``KUBECONFIG`` to
        specify multiple configuration files.

    :return KubeConfig: A configuration object which has merged all of the
        configuration from the specified configuration files.  Merging is
        performed according to
        https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#merging-kubeconfig-files
    """
    paths = list(
        FilePath(p)
        for p
        in kubeconfigs.split(pathsep)
        if p
    )
    config = _merge_configs(list(
        KubeConfig.from_file(p.path)
        for p
        in paths
    ))
    return config