code: def mul(cp, size, factor):
      _check_params(len(cp), size)
      clip = _get_clipfn(size)
  
      result = create_string_buffer(len(cp))
  
      for i, sample in enumerate(_get_samples(cp, size)):
          sample = clip(int(sample * factor))
          _put_sample(result, size, i, sample)
  
      return result.raw
  
imports: import math
  import struct
  from ctypes import create_string_buffer
label_desc: Use image node_id 24 for calling a global function with example usage: mul(cp, size, factor) and returns: result