code: def from_yang(self, text: str) -> Optional[QualName]:
          
          try:
              return self.sctx.schema_data.translate_pname(text, self.sctx.text_mid)
          except (ModuleNotRegistered, UnknownPrefix):
              raise InvalidArgument(text)
docs: Override the superclass method.