code: def flatten(d, parent_key="", sep="_"):
      items = []
      for k, v in d.items():
          new_key = parent_key + sep + k if parent_key else k
          if isinstance(v, collections.MutableMapping):
              items.extend(flatten(v, new_key, sep=sep).items())
          else:
              items.append((new_key, v))
      return dict(items)
  
imports: import pandas
  import collections
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor
label_desc: Use image node_id 1 for calling a global function with example usage: flatten(d, parent_key, sep) and returns: dict