docs: def load(self):
          """
          Load dependencies for all loaded schemas.
          This method gets called before any operation that requires dependencies: delete, drop, populate, progress.
          """
  
          # reload from scratch to prevent duplication of renamed edges
          self.clear()
  
          # load primary key info
          keys = self._conn.query("""
                  SELECT
                      concat('`', table_schema, '`.`', table_name, '`') as tab, column_name
                  FROM information_schema.key_column_usage
                  WHERE table_name not LIKE "~%%" AND table_schema in ('{schemas}') AND constraint_name="PRIMARY"
                  """.format(schemas="','".join(self._conn.schemas)))
          pks = defaultdict(set)
          for key in keys:
              pks[key[0]].add(key[1])
  
          # add nodes to the graph
          for n, pk in pks.items():
              self.add_node(n, primary_key=pk)
  
          # load foreign keys
          keys = self._conn.query("""
          SELECT constraint_name,
              concat('`', table_schema, '`.`', table_name, '`') as referencing_table,
              concat('`', referenced_table_schema, '`.`',  referenced_table_name, '`') as referenced_table,
              column_name, referenced_column_name
          FROM information_schema.key_column_usage
          WHERE referenced_table_name NOT LIKE "~%%" AND (referenced_table_schema in ('{schemas}') OR
              referenced_table_schema is not NULL AND table_schema in ('{schemas}'))
          """.format(schemas="','".join(self._conn.schemas)), as_dict=True)
          fks = defaultdict(lambda: dict(attr_map=OrderedDict()))
          for key in keys:
              d = fks[(key['constraint_name'], key['referencing_table'], key['referenced_table'])]
              d['referencing_table'] = key['referencing_table']
              d['referenced_table'] = key['referenced_table']
              d['attr_map'][key['column_name']] = key['referenced_column_name']
  
          # add edges to the graph
          for fk in fks.values():
              props = dict(
                  primary=all(attr in pks[fk['referencing_table']] for attr in fk['attr_map']),
                  attr_map=fk['attr_map'],
                  aliased=any(k != v for k, v in fk['attr_map'].items()),
                  multi=not all(a in fk['attr_map'] for a in pks[fk['referencing_table']]))
              if not props['aliased']:
                  self.add_edge(fk['referenced_table'], fk['referencing_table'], **props)
              else:
                  # for aliased dependencies, add an extra node in the format '1', '2', etc
                  alias_node = '%d' % next(self._node_alias_count)
                  self.add_node(alias_node)
                  self.add_edge(fk['referenced_table'], alias_node, **props)
                  self.add_edge(alias_node, fk['referencing_table'], **props)
  
          if not nx.is_directed_acyclic_graph(self):  # pragma: no cover
              raise DataJointError('DataJoint can only work with acyclic dependencies')