code: def lookup_class_name(name, context, depth=3):
      
      # breadth-first search
      nodes = [dict(context=context, context_name='', depth=depth)]
      while nodes:
          node = nodes.pop(0)
          for member_name, member in node['context'].items():
              if not member_name.startswith('_'):  # skip IPython's implicit variables
                  if inspect.isclass(member) and issubclass(member, Table):
                      if member.full_table_name == name:   # found it!
                          return '.'.join([node['context_name'],  member_name]).lstrip('.')
                      try:  # look for part tables
                          parts = member._ordered_class_members
                      except AttributeError:
                          pass  # not a UserTable -- cannot have part tables.
                      else:
                          for part in (getattr(member, p) for p in parts if p[0].isupper() and hasattr(member, p)):
                              if inspect.isclass(part) and issubclass(part, Table) and part.full_table_name == name:
                                  return '.'.join([node['context_name'], member_name, part.__name__]).lstrip('.')
                  elif node['depth'] > 0 and inspect.ismodule(member) and member.__name__ != 'datajoint':
                      try:
                          nodes.append(
                              dict(context=dict(inspect.getmembers(member)),
                                   context_name=node['context_name'] + '.' + member_name,
                                   depth=node['depth']-1))
                      except ImportError:
                          pass  # could not import, so do not attempt
      return None
docs: given a table name in the form `schema_name`.`table_name`, find its class in the context.
      :param name: `schema_name`.`table_name`
      :param context: dictionary representing the namespace
      :param depth: search depth into imported modules, helps avoid infinite recursion.
      :return: class name found in the context or None if not found