code: def _customized_loader(container, loader=Loader, mapping_tag=_MAPPING_TAG):
      
      def construct_mapping(loader, node, deep=False):
          """Construct python object from yaml mapping node, based on
          :meth:`yaml.BaseConstructor.construct_mapping` in PyYAML (MIT).
          """
          loader.flatten_mapping(node)
          if not isinstance(node, yaml.MappingNode):
              msg = "expected a mapping node, but found %s" % node.id
              raise yaml.constructor.ConstructorError(None, None, msg,
                                                      node.start_mark)
          mapping = container()
          for key_node, value_node in node.value:
              key = loader.construct_object(key_node, deep=deep)
              try:
                  hash(key)
              except TypeError as exc:
                  eargs = ("while constructing a mapping",
                           node.start_mark,
                           "found unacceptable key (%s)" % exc,
                           key_node.start_mark)
                  raise yaml.constructor.ConstructorError(*eargs)
              value = loader.construct_object(value_node, deep=deep)
              mapping[key] = value
  
          return mapping
  
      tag = "tag:yaml.org,2002:python/unicode"
  
      def construct_ustr(loader, node):
          """Unicode string constructor"""
          return loader.construct_scalar(node)
  
      try:
          loader.add_constructor(tag, construct_ustr)
      except NameError:
          pass
  
      if type(container) != dict:
          loader.add_constructor(mapping_tag, construct_mapping)
      return loader
docs: Create or update loader with making given callble 'container' to make
      mapping objects such as dict and OrderedDict, used to construct python
      object from yaml mapping node internally.
  
      :param container: Set container used internally