code: def find1(self, kw: YangIdentifier, arg: str = None,
                pref: YangIdentifier = None,
                required: bool = False) -> Optional["Statement"]:
          
          for sub in self.substatements:
              if (sub.keyword == kw and sub.prefix == pref and
                      (arg is None or sub.argument == arg)):
                  return sub
          if required:
              raise StatementNotFound(str(self), kw)
docs: Return first substatement with the given parameters.
  
          Args:
              kw: Statement keyword (local part for extensions).
              arg: Argument (all arguments will match if ``None``).
              pref: Keyword prefix (``None`` for built-in statements).
              required: Should an exception be raised on failure?
  
          Raises:
              StatementNotFound: If `required` is ``True`` and the
                  statement is not found.