code: def nodes_to_queries(
      g, type_col: Optional[str] = None, untyped: bool = False
  ) -> Iterable[str]:
      """
      Convert graphistry object to stream of gremlin node add strings:
      * If type is None, try to default to fields  'category' or 'type'. Skip via untyped=True.
      * Put remaining attributes as string-valued properties
      """
  
      if g._nodes is None:
          raise ValueError(
              "No nodes bound to graph yet, try calling g.nodes(df)"
          )
  
      if (not untyped) and (type_col is None):
          if "category" in g._nodes:
              type_col = "category"
          elif "type" in g._nodes:
              type_col = "type"
          else:
              raise Exception(
                  "Must specify node type_col or provide node column category or type"
              )
  
      skiplist = [type_col] if not untyped else []
      keys = [c for c in g._nodes if c not in skiplist]
  
      if type_col is not None:
          if type_col not in g._nodes:
              raise ValueError(
                  f'type_col="{type_col}" specified yet not in data'
              )
  
      return (
          node_to_query(row, type_col, untyped, keys)
          for index, row in g._nodes.iterrows()
      )
  
imports: from typing import Any, Callable, Iterable, List, Optional, Set, Union, TYPE_CHECKING
  import os, pandas
  from .Plottable import Plottable
  from .util import setup_logger
label_desc: Use image node_id 4 for calling a global function with example usage: nodes_to_queries(g, type_col, untyped) and returns: unknown