code: def _is_creator(model):
      return inspect.ismethod(model) or inspect.isfunction(model)
  
imports: from collections import namedtuple
  from typing import Optional, Union
  import pytorch_lightning
  from pytorch_lightning.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS
  from pytorch_lightning.utilities import rank_zero_deprecation
  from pytorch_lightning.core.datamodule import LightningDataModule
  from bigdl.nano.pytorch import InferenceOptimizer
  from bigdl.nano.automl.hpo.backend import create_pl_pruning_callback
  from bigdl.nano.utils.common import invalidInputError
  from ._helper import LatencyCallback, _remove_metric_prefix, BestMetricCallback
  import inspect
  import copy
label_desc: Use image node_id 1 for calling a global function with example usage: _is_creator(model) and returns: unknown