code: def add_mappings(self, defn: Definition, target: Dict) -> None:
          
          self.add_id_prefixes(defn)
          for mapping in defn.mappings:
              if '://' in mapping:
                  target['@id'] = mapping
              else:
                  if ':' not in mapping or len(mapping.split(':')) != 2:
                      raise ValueError(f"Definition {defn.name} = unrecognized mapping: {mapping}")
                  ns = mapping.split(':')[0]
                  self.add_prefix(ns)
                  target['@id'] = defn.mappings[0]
docs: Process any mappings in defn, adding all of the mappings prefixes to the namespace map and
          add a link to the first mapping to the target
  
          @param defn: Class or Slot definition
          @param target: context target