code: def slot_definition_for(self, slotname: SlotDefinitionName, cls: ClassDefinition) -> Optional[SlotDefinition]:
          
          if cls.is_a:
              for sn in self.schema.classes[cls.is_a].slots:
                  slot = self.schema.slots[sn]
                  if slot.alias and slotname == slot.alias or slotname == slot.name:
                      return slot
          for mixin in cls.mixins:
              for sn in self.schema.classes[mixin].slots:
                  slot = self.schema.slots[sn]
                  if slot.alias and slotname == slot.alias or slotname == slot.name:
                      return slot
          if cls.is_a:
              defn = self.slot_definition_for(slotname, self.schema.classes[cls.is_a])
              if defn:
                  return defn
          for mixin in cls.mixins:
              defn = self.slot_definition_for(slotname, self.schema.classes[mixin])
              if defn:
                  return defn
          return None
docs: Find the most proximal definition for slotname in the context of cls