def from_yang(self, text: str) -> Optional[QualName]:
        """Override the superclass method."""
        try:
            return self.sctx.schema_data.translate_pname(text, self.sctx.text_mid)
        except (ModuleNotRegistered, UnknownPrefix):
            raise InvalidArgument(text)
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 )
Override the superclass method.