code: def example_hin_1_nx(
      feature_name=None, for_nodes=None, feature_sizes=None
  ):
      # stellargraph
      graph = nx.Graph()
      graph.add_nodes_from([0, 1, 2, 3], label="A")
      graph.add_nodes_from([4, 5, 6], label="B")
      graph.add_edges_from(
          [(0, 4), (1, 4), (1, 5), (2, 4), (3, 5)], label="R"
      )
      graph.add_edges_from([(4, 5)], label="F")
  
      if feature_name is not None:
          if for_nodes is None:
              for_nodes = list(graph.nodes())
  
          if feature_sizes is None:
              feature_sizes = dict()
  
          for v in for_nodes:
              fs = feature_sizes.get(graph.nodes[v]["label"], 10)
              graph.nodes[v][feature_name] = v * np.ones(fs)
  
      return graph
  
imports: from stellargraph import StellarGraph, StellarDiGraph, IndexedArray
  import networkx
  import pandas
  import numpy
  import random
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: example_hin_1_nx(feature_name, for_nodes, feature_sizes) and returns: graph