docstr: Load this dataset into an undirected heterogeneous graph, downloading it if required.
  
  The graph has two types of nodes, 'user' and 'group', and two types of edges, 'friend' and 'belongs'.
  The 'friend' edges connect two 'user' nodes and the 'belongs' edges connects 'user' and 'group' nodes.
  
  The node and edge types are not included in the dataset that is a collection of node and group ids along with
  the list of edges in the graph.
  
  Important note about the node IDs: The dataset uses integers for node ids. However, the integers from 1 to 39 are
  used as IDs for both users and groups. This would cause a confusion when constructing the graph object.
  As a result, we convert all IDs to string and append the character 'u' to the integer ID for user nodes and the
  character 'g' to the integer ID for group nodes.
  
  Returns:
      A :class:`.StellarGraph` object.
docstr_tok: ["Load","this","dataset","into","an","undirected","heterogeneous","graph",",","downloading","it","if","required",".","The","graph","has","two","types","of","nodes",",","'user","'","and","'group","'",",","and","two","types","of","edges",",","'friend","'","and","'belongs","'",".","The","'friend","'","edges","connect","two","'user","'","nodes","and","the","'belongs","'","edges","connects","'user","'","and","'group","'","nodes",".","The","node","and","edge","types","are","not","included","in","the","dataset","that","is","a","collection","of","node","and","group","ids","along","with","the","list","of","edges","in","the","graph",".","Important","note","about","the","node","IDs",":","The","dataset","uses","integers","for","node","ids",".","However",",","the","integers","from","1","to","39","are","used","as","IDs","for","both","users","and","groups",".","This","would","cause","a","confusion","when","constructing","the","graph","object",".","As","a","result",",","we","convert","all","IDs","to","string","and","append","the","character","'","u","'","to","the","integer","ID","for","user","nodes","and","the","character","'","g","'","to","the","integer","ID","for","group","nodes",".","Returns",":","A",":","class",":","`",".StellarGraph","`","object","."]
code: def load(self):
      """
      Load this dataset into an undirected heterogeneous graph, downloading it if required.
  
      The graph has two types of nodes, 'user' and 'group', and two types of edges, 'friend' and 'belongs'.
      The 'friend' edges connect two 'user' nodes and the 'belongs' edges connects 'user' and 'group' nodes.
  
      The node and edge types are not included in the dataset that is a collection of node and group ids along with
      the list of edges in the graph.
  
      Important note about the node IDs: The dataset uses integers for node ids. However, the integers from 1 to 39 are
      used as IDs for both users and groups. This would cause a confusion when constructing the graph object.
      As a result, we convert all IDs to string and append the character 'u' to the integer ID for user nodes and the
      character 'g' to the integer ID for group nodes.
  
      Returns:
          A :class:`.StellarGraph` object.
      """
      self.download()
  
      # load the raw data
      edges, group_edges, groups, nodes = [
          self._resolve_path(name) for name in self.expected_files
      ]
  
      user_node_ids = pd.read_csv(nodes, header=None)
      group_ids = pd.read_csv(groups, header=None)
      edges = pd.read_csv(
          edges, header=None, names=["source", "target"]
      )
      group_edges = pd.read_csv(
          group_edges, header=None, names=["source", "target"]
      )
  
      # The dataset uses integers for node ids. However, the integers from 1 to 39 are used as IDs
      # for both users and groups. This is disambiguated by converting everything to strings and
      # prepending u to user IDs, and g to group IDs.
      def u(users):
          return "u" + users.astype(str)
  
      def g(groups):
          return "g" + groups.astype(str)
  
      # nodes:
      user_node_ids = u(user_node_ids)
      group_ids = g(group_ids)
  
      # node IDs in each edge:
      edges = u(edges)
      group_edges["source"] = u(group_edges["source"])
      group_edges["target"] = g(group_edges["target"])
  
      # arrange the DataFrame indices appropriately: nodes use their node IDs, which have
      # been made distinct above, and the group edges have IDs after the other edges
      user_node_ids.set_index(0, inplace=True)
      group_ids.set_index(0, inplace=True)
  
      start = len(edges)
      group_edges.index = range(start, start + len(group_edges))
  
      return StellarGraph(
          nodes={"user": user_node_ids, "group": group_ids},
          edges={"friend": edges, "belongs": group_edges},
      )
  
imports: from .dataset_loader import DatasetLoader
  from ..core.graph import StellarGraph, StellarDiGraph
  import itertools
  import logging
  import os
  import pandas
  import numpy
  from sklearn import preprocessing
  from ..core.experimental import experimental
label_desc: Use image node_id 1 for calling the BlogCatalog3 obj's underlying member method code with example usage: obj.load() and returns: StellarGraph, unknown, unknown