code: def bolt_graph_to_nodes_dataframe(graph) -> pd.DataFrame:
      is_neptune = False
  
      for node in graph.nodes:
          # neptune results not returing element_id, so use id instead
          is_neptune = not hasattr(node, "element_id")
          break
  
      if is_neptune:
          map_dict_df = pd.DataFrame(
              [
                  {
                      node_id_key: node.id,
                      node_type_key: ",".join(
                          sorted([str(label) for label in node.labels])
                      ),
                  }
                  for node in graph.nodes
              ]
          )
      else:
          map_dict_df = pd.DataFrame(
              [
                  {
                      node_id_key: node.element_id,
                      node_type_key: ",".join(
                          sorted([str(label) for label in node.labels])
                      ),
                  }
                  for node in graph.nodes
              ]
          )
  
      df = pd.DataFrame(
          [
              util.merge_two_dicts(
                  {key: value for (key, value) in node.items()},
                  {
                      node_label_prefix_key + str(label): True
                      for label in node.labels
                  },
              )
              for node in graph.nodes
          ]
      )
  
      joined_df = map_dict_df.merge(
          df, how="outer", left_index=True, right_index=True
      )
  
      if len(joined_df) == 0:
          util.warn("Query returned no nodes")
          return pd.DataFrame(
              {
                  node_id_key: pd.Series([], dtype="int32"),
                  node_type_key: pd.Series([], dtype="object"),
              }
          )
      return neo_df_to_pd_df(joined_df)
  
file_path: pygraphistry/graphistry/bolt_util.py
imports: import pandas
  from datetime import datetime
  from .pygraphistry import util
  from .util import setup_logger
label_desc: Use image node_id 3 for calling a global function with example usage: bolt_graph_to_nodes_dataframe(graph) and returns: neo_df_to_pd_df, pd