code: def parse_keys(self, sn: "DataNode") -> Dict[InstanceName, ScalarValue]:
          
          res = {}
          for k in self.keys:
              knod = sn.get_data_child(*k)
              if knod is None:
                  raise NonexistentSchemaNode(sn.qual_name, *k)
              kval = knod.type.parse_value(self.keys[k])
              if kval is None:
                  raise InvalidKeyValue(self.keys[k])
              res[knod.iname()] = kval
          return res
docs: Parse key dictionary in the context of a schema node.
  
          Args:
              sn: Schema node corresponding to a list.