code: def resolve_partition_key(g, partition_key=None):
      if partition_key is not None:
          return partition_key
      elif g._nodes is not None and "partition" in g._nodes:
          return "partition"
      elif g._nodes is not None and "community" in g._nodes:
          return "community"
      elif g._nodes is not None and "cluster" in g._nodes:
          return "cluster"
      else:
          return "partition"
  
file_path: pygraphistry/graphistry/layout/gib/gib.py
imports: from typing import List, Optional, Union
  from typing_extensions import Literal
  import pandas
  from graphistry.Engine import Engine
  from graphistry.Plottable import Plottable
  from graphistry.util import setup_logger
  from .partition import partition
  from .partitioned_layout import partitioned_layout
  from .style import style_layout
  from .treemap import treemap
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_partition_key(g, partition_key) and returns: partition_key, str, str, str, str