docs: def _lookup_namespace(self, symbol, namespace):
          """Helper for lookup_symbol that only looks up variables in a
          namespace.
  
          Args:
            symbol: Symbol
            namespace: pointer into self.namespaces
          """
          for namespace_part in symbol.parts:
              namespace = namespace.get(namespace_part)
              if namespace is None:
                  break
              if not isinstance(namespace, dict):
                  return namespace
          raise Error('%s not found' % symbol.name)