docs: def has_namespace_name(self, line: str, position: int, namespace: str, name: str) -> bool:
          """Check that the namespace is defined and has the given name."""
          self.raise_for_missing_namespace(line, position, namespace, name)
          return self.has_enumerated_namespace_name(namespace, name) or self.has_regex_namespace_name(namespace, name)