code: def _call_fn_maybe_with_counter(fn, counter, *args):
      fn_args = inspect.getargspec(fn).args
      if "counter" in fn_args:
          return fn(*args, counter=counter)
      else:
          return fn(*args)
  
file_path: analytics-zoo/pyzoo/zoo/tfpark/gan/gan_estimator.py
imports: import inspect
  import os
  import tempfile
  import tensorflow
  from zoo.tfpark import TFOptimizer
  from zoo.tfpark.zoo_optimizer import FakeOptimMethod
  from zoo.util import nest
label_desc: Use image node_id 2 for calling the GANEstimator obj's underlying member method code with example usage: obj._call_fn_maybe_with_counter(fn, counter) and returns: fn, fn