code: def get_default_varnames(var_iterator, include_transformed):
      r"""Helper to extract default varnames from a trace.
  
      Parameters
      ----------
      varname_iterator: iterator
          Elements will be cast to string to check whether it is transformed, and optionally filtered
      include_transformed: boolean
          Should transformed variable names be included in return value
  
      Returns
      -------
      list
          List of variables, possibly filtered
      """
      if include_transformed:
          return list(var_iterator)
      else:
          return [
              var
              for var in var_iterator
              if not is_transformed_name(get_var_name(var))
          ]
  
imports: import functools
  import warnings
  from typing import Any, Dict, List, NewType, Optional, Sequence, Tuple, Union, cast
  import arviz
  import cloudpickle
  import numpy
  import xarray
  from cachetools import LRUCache, cachedmethod
  from pytensor import Variable
  from pytensor.compile import SharedVariable
  from pytensor.graph.utils import ValidatingScratchpad
  from pymc.exceptions import BlockModelAccessError
label_desc: Use image node_id 5 for calling a global function with example usage: get_default_varnames(var_iterator, include_transformed) and returns: list, unknown