code: def pickle_obj(obj, filepath, serializer):
      if serializer == "pickle":
          with open(filepath, "wb") as f:
              pickle.dump(obj, f)
      elif serializer == "joblib":
          joblib.dump(obj, filepath)
      elif serializer == "cloudpickle":
          with open(filepath, "wb") as f:
              cloudpickle.dump(obj, f)
      else:
          raise ValueError(
              f"Unrecognized serializer type: {serializer}"
          )
  
imports: import pickle
  from functools import lru_cache
  from inspect import getfullargspec
  import cloudpickle
  import joblib
  import numpy
  import sklearn.datasets
  from sklearn.utils import check_random_state
  import lightgbm
label_desc: Use image node_id 12 for calling a global function with example usage: pickle_obj(obj, filepath, serializer) without return types