code: def handle_zeros_in_scale(scale):
      scale = scale.copy()
      if isinstance(scale, (np.ndarray, da.Array)):
          scale[scale == 0.0] = 1.0
      elif isinstance(scale, (pd.Series, dd.Series)):
          scale = scale.where(scale != 0, 1)
      return scale
  
imports: import contextlib
  import datetime
  import functools
  import logging
  import warnings
  from collections.abc import Sequence
  from multiprocessing import cpu_count
  from numbers import Integral
  from timeit import default_timer
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import sklearn.utils.extmath
  import sklearn.utils.validation
  from dask import delayed
  from dask.array.utils import assert_eq
  from dask.dataframe.utils import assert_eq
  from ._utils import ConstantFunction
label_desc: Use image node_id 5 for calling a global function with example usage: handle_zeros_in_scale(scale) and returns: scale