code: def construct_mapping(self, node, deep=False):  # type: ignore[no-untyped-def]
      if not isinstance(node, MappingNode):
          raise ConstructorError(
              None,
              None,
              f"expected a mapping node, but found {node.id}",
              node.start_mark,
          )
      mapping = {}
      for key_node, value_node in node.value:
          key = self.construct_object(key_node, deep=deep)  # type: ignore[no-untyped-call]
          try:
              hash(key)
          except TypeError as e:
              raise ConstructorError(
                  "while constructing a mapping",
                  node.start_mark,
                  "found unacceptable key ",
                  key_node.start_mark,
              ) from e
          # check for duplicate keys
          if key in mapping:
              raise ConstructorError(
                  "while constructing a mapping",
                  node.start_mark,
                  "found duplicate key",
                  key_node.start_mark,
              )
          value = self.construct_object(value_node, deep=deep)  # type: ignore[no-untyped-call]
          mapping[key] = value
      return mapping
  
imports: import argparse
  import array
  import codecs
  import copy
  import glob
  import io
  import os
  import re
  import sys
  from itertools import product
  import subprocess
  import textwrap
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Set, Tuple, Union
  import yaml
  from yaml.constructor import ConstructorError
  from yaml.nodes import MappingNode
label_desc: Use image node_id 1 for calling the UniqueKeyLoader obj's underlying member method code with example usage: obj.construct_mapping(node, deep) and returns: mapping