Loads a ContainerMap configuration from a YAML file.

    :param filename: YAML file name.
    :type filename: unicode | str
    :param name: Name of the ContainerMap. If ``None`` will attempt to find a ``name`` element on the root level of
      the document; an empty string names the map according to the file, without extension.
    :type name: unicode | str
    :param check_integrity: Performs a brief integrity check; default is ``True``.
    :type check_integrity: bool
    :return: A ContainerMap object.
    :rtype: ContainerMap

def load_map_file(filename, name=None, check_integrity=True):
    """
    Loads a ContainerMap configuration from a YAML file.

    :param filename: YAML file name.
    :type filename: unicode | str
    :param name: Name of the ContainerMap. If ``None`` will attempt to find a ``name`` element on the root level of
      the document; an empty string names the map according to the file, without extension.
    :type name: unicode | str
    :param check_integrity: Performs a brief integrity check; default is ``True``.
    :type check_integrity: bool
    :return: A ContainerMap object.
    :rtype: ContainerMap
    """
    if name == '':
        base_name = os.path.basename(filename)
        map_name, __, __ = os.path.basename(base_name).rpartition(os.path.extsep)
    else:
        map_name = name
    with open(filename, 'r') as f:
        return load_map(f, name=map_name, check_integrity=check_integrity)