code: def construct_mapping(self, node, deep=False):
          '''
          Build the mapping for YAML
          '''
          if not isinstance(node, MappingNode):
              raise ConstructorError(
                  None,
                  None,
                  'expected a mapping node, but found {0}'.format(node.id),
                  node.start_mark)
  
          self.flatten_mapping(node)
  
          context = 'while constructing a mapping'
          mapping = self.dictclass()
          for key_node, value_node in node.value:
              key = self.construct_object(key_node, deep=deep)
              try:
                  hash(key)
              except TypeError:
                  raise ConstructorError(
                      context,
                      node.start_mark,
                      "found unacceptable key {0}".format(key_node.value),
                      key_node.start_mark)
              value = self.construct_object(value_node, deep=deep)
              if key in mapping:
                  raise ConstructorError(
                      context,
                      node.start_mark,
                      "found conflicting ID '{0}'".format(key),
                      key_node.start_mark)
              mapping[key] = value
          return mappinf construct_mapping(self, node, deep=False):
          '''
          Build the mapping for YAML
          '''
          if not isinstance(node, MappingNode):
              raise ConstructorError(
                  None,
                  None,
                  'expected a mapping node, but found {0}'.format(node.id),
                  node.start_mark)
  
          self.flatten_mapping(node)
  
          context = 'while constructing a mapping'
          mapping = self.dictclass()
          for key_node, value_node in node.value:
              key = self.construct_object(key_node, deep=deep)
              try:
                  hash(key)
              except TypeError:
                  raise ConstructorError(
                      context,
                      node.start_mark,
                      "found unacceptable key {0}".format(key_node.value),
                      key_node.start_mark)
              value = self.construct_object(value_node, deep=deep)
              if key in mapping:
                  raise ConstructorError(
                      context,
                      node.start_mark,
                      "found conflicting ID '{0}'".format(key),
                      key_node.start_mark)
              mapping[key] = value
          return mapping
docs: Build the mapping for YAML