def network(self, figsize=(<NUM_LIT>, <NUM_LIT:9>), fig=True):
conn_types = ['<STR_LIT>', '<STR_LIT>']<EOL>conn_colors = mpl.sns.color_palette('<STR_LIT>', len(conn_types))<EOL>conn = dict(zip(conn_types, conn_colors))<EOL>def get_node_type_color(obj):<EOL><INDENT>"""<STR_LIT>"""<EOL>cols = mpl.sns.color_palette('<STR_LIT>', len(conn_types))<EOL>for col in cols:<EOL><INDENT>if isinstance(obj, (pd.DataFrame, pd.Series, pd.SparseSeries, pd.SparseDataFrame)):<EOL><INDENT>typ = type(obj)<EOL>return '<STR_LIT:.>'.join((typ.__module__, typ.__name__)), col<EOL><DEDENT><DEDENT>return '<STR_LIT>', '<STR_LIT>'<EOL><DEDENT>def legend(items, name, loc, ax):<EOL><INDENT>"""<STR_LIT>"""<EOL>proxies = []<EOL>descriptions = []<EOL>for label, color in items:<EOL><INDENT>if label == '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>if name == '<STR_LIT>':<EOL><INDENT>line = mpl.sns.mpl.lines.Line2D([], [], linestyle='<STR_LIT:none>', color=color, marker='<STR_LIT:o>')<EOL><DEDENT>else:<EOL><INDENT>line = mpl.sns.mpl.lines.Line2D([], [], linestyle='<STR_LIT:->', color=color)<EOL><DEDENT>proxies.append(line)<EOL>descriptions.append(label)<EOL><DEDENT>lgnd = ax.legend(proxies, descriptions, title=name, loc=loc, frameon=True)<EOL>lgnd_frame = lgnd.get_frame()<EOL>lgnd_frame.set_facecolor('<STR_LIT>')<EOL>lgnd_frame.set_edgecolor('<STR_LIT>')<EOL>return lgnd, ax<EOL><DEDENT>info = self.info()<EOL>info = info[info['<STR_LIT:type>'] != '<STR_LIT:->']<EOL>info['<STR_LIT:size>'] *= <NUM_LIT>/info['<STR_LIT:size>'].max()<EOL>info['<STR_LIT:size>'] += <NUM_LIT><EOL>node_size_dict = info['<STR_LIT:size>'].to_dict()      <EOL>node_class_name_dict = info['<STR_LIT:type>'].to_dict()<EOL>node_type_dict = {}    <EOL>node_conn_dict = {}    <EOL>items = self._data().items()<EOL>for k0, v0 in items:<EOL><INDENT>n0 = k0[<NUM_LIT:1>:] if k0.startswith('<STR_LIT:_>') else k0<EOL>node_type_dict[n0] = get_node_type_color(v0)<EOL>for k1, v1 in items:<EOL><INDENT>if v0 is v1:<EOL><INDENT>continue<EOL><DEDENT>n1 = k1[<NUM_LIT:1>:] if k1.startswith('<STR_LIT:_>') else k1<EOL>for name in v0.index.names:    <EOL><INDENT>if name is None:           <EOL><INDENT>continue<EOL><DEDENT>if name in v1.index.names:<EOL><INDENT>contyp = '<STR_LIT>'<EOL>node_conn_dict[(n0, n1)] = (contyp, conn[contyp])<EOL>node_conn_dict[(n1, n0)] = (contyp, conn[contyp])<EOL><DEDENT>for col in v1.columns:<EOL><INDENT>if name == col or (name == col[:-<NUM_LIT:1>] and col[-<NUM_LIT:1>].isdigit()):<EOL><INDENT>contyp = '<STR_LIT>'<EOL>node_conn_dict[(n0, n1)] = (contyp, conn[contyp])<EOL>node_conn_dict[(n1, n0)] = ('<STR_LIT>', conn[contyp])<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>g = nx.Graph()<EOL>g.add_nodes_from(node_size_dict.keys())<EOL>g.add_edges_from(node_conn_dict.keys())<EOL>node_sizes = [node_size_dict[node] for node in g.nodes()]<EOL>node_labels = {node: '<STR_LIT>'.format(node, node_class_name_dict[node]) for node in g.nodes()}<EOL>node_colors = [node_type_dict[node][<NUM_LIT:1>] for node in g.nodes()]<EOL>edge_colors = [node_conn_dict[edge][<NUM_LIT:1>] for edge in g.edges()]<EOL>if fig:<EOL><INDENT>fig, ax = plt.subplots(<NUM_LIT:1>, figsize=figsize)<EOL>ax.axis('<STR_LIT>')<EOL>pos = nx.spring_layout(g)<EOL>nx.draw_networkx_nodes(g, pos=pos, ax=ax, alpha=<NUM_LIT>, node_size=node_sizes,<EOL>node_color=node_colors)<EOL>nx.draw_networkx_labels(g, pos=pos, labels=node_labels, font_size=<NUM_LIT>,<EOL>font_weight='<STR_LIT>', ax=ax)<EOL>nx.draw_networkx_edges(g, pos=pos, edge_color=edge_colors, width=<NUM_LIT:2>, ax=ax)<EOL>l1, ax = legend(set(node_conn_dict.values()), '<STR_LIT>', (<NUM_LIT:1>, <NUM_LIT:0>), ax)<EOL>_, ax = legend(set(node_type_dict.values()), '<STR_LIT>', (<NUM_LIT:1>, <NUM_LIT>), ax)<EOL>fig.gca().add_artist(l1)<EOL><DEDENT>g.edge_types = {node: value[<NUM_LIT:0>] for node, value in node_conn_dict.items()}  <EOL>return g<EOL>
Display information about the container's object relationships.

Nodes correspond to data objects. The size of the node corresponds
to the size of the table in memory. The color of the node corresponds
to its fundamental data type. Nodes are labeled by their container
name; class information is listed below. The color of the connections
correspond to the type of relationship; either an index of one table
corresponds to a column in another table or the two tables share an
index.

Args:
    figsize (tuple): Tuple containing figure dimensions
    fig (bool): Generate the figure (default true)

Returns:
    graph: Network graph object containing data relationships