code: def makebatch(merge=None):
      if merge:
          makebatch = compose([tablemergekeys(), merge])
      else:
          makebatch = compose(
              [
                  tablemergekeys(),
                  tableapply(
                      lambda field: mergetensor(field)
                      if canmerge(field)
                      else field
                  ),
              ]
          )
  
      return makebatch
  
imports: from six import iteritems
  from .table import canmergetensor
  from .table import mergetensor
label_desc: Use image node_id 3 for calling a global function with example usage: makebatch(merge) and returns: makebatch