code: def _init_img_params(param):
          
  
          if param is not None:
              param = np.atleast_1d(param)
              if len(param) == 1:
                  param = np.repeat(param, 2)
  
          return param
docs: Initialize 2D image-type parameters that can accept either a
          single or two values.