code: def _validate_iterables(node, iterables, fields):
      """
      Raise TypeError if an iterables member is not iterable.
  
      Raise ValueError if an iterables member is not a (field, values) pair.
  
      Raise ValueError if an iterable field is not in the inputs.
      """
      # The iterables can be a {field: value list} dictionary.
      if isinstance(iterables, dict):
          iterables = list(iterables.items())
      elif not isinstance(iterables, tuple) and not isinstance(
          iterables, list
      ):
          raise ValueError(
              "The %s iterables type is not a list or a dictionary:"
              " %s" % (node.name, iterables.__class__)
          )
      for item in iterables:
          try:
              if len(item) != 2:
                  raise ValueError(
                      "The %s iterables is not a [(field, values)] list"
                      % node.name
                  )
          except TypeError as e:
              raise TypeError(
                  f"A {node.name} iterables member is not iterable: {e}"
              )
          field, _ = item
          if field not in fields:
              raise ValueError(
                  f"The {node.name} iterables field is unrecognized: {field}"
              )
  
imports: import os
  import sys
  import pickle
  from collections import defaultdict
  import re
  from copy import deepcopy
  from glob import glob
  from pathlib import Path
  from traceback import format_exception
  from hashlib import sha1
  from functools import reduce
  import numpy
  from ...None import logging, config
  from ...utils.filemanip import indirectory, relpath, fname_presuffix, ensure_list, get_related_files, save_json, savepkl, loadpkl, write_rst_header, write_rst_dict, write_rst_list
  from ...utils.misc import str2bool
  from ...utils.functions import create_function_from_source
  from ...interfaces.base.traits_extension import rebase_path_traits, resolve_path_traits, OutputMultiPath, isdefined, Undefined
  from ...interfaces.base.support import Bunch, InterfaceResult
  from ...interfaces.base import CommandLine
  from ...interfaces.utility import IdentityInterface
  from ...utils.provenance import ProvStore, pm, nipype_ns, get_id
  from inspect import signature
label_desc: Use image node_id 34 for calling a global function with example usage: _validate_iterables(node, iterables, fields) without return types