code: def node_to_query(
      d: dict,
      type_col: Optional[str] = None,
      untyped: bool = False,
      keys: List[str] = [],
  ) -> str:
      """
      Convert node dictionary to gremlin node add string
      * Put remaining attributes as string-valued properties
      """
  
      if untyped:
          base = "g.addV()"
      else:
          base = f"g.addV('{clean_str(d[type_col])}')"
  
      for p in keys:
          if not pd.isna(d[p]):
              base += (
                  f".property('{clean_str(p)}', '{clean_str(d[p])}')"
              )
  
      return base
  
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 3 for calling a global function with example usage: node_to_query(d, type_col, untyped, keys) and returns: base