code: def scale_parameter(level, maxval, type):
      """
      Helper function to scale `val` between 0 and maxval .
  
      Parameters
      ----------
      level: Level of the operation.
      maxval: Maximum value that the operation can have.
      type: return float or int
  
      Returns
      -------
      An adjust scale
      """
      if type == "float":
          return float(level) * maxval
      elif type == "int":
          return int(level * maxval)
  
imports: import logging
  import random
  import nltk
  from PIL import Image, ImageEnhance, ImageOps
  from ..constants import AUTOMM, IMAGE, TEXT
label_desc: Use image node_id 1 for calling a global function with example usage: scale_parameter(level, maxval, type) and returns: unknown, int