code: def _get_validated_scale(scale):
      """Returns the scale guaranteed to be a positive integer."""
      scale = int(scale)
      if scale <= 0:
          raise ValueError("`scale` must be a positive integer.")
      return scale
  
file_path: magenta/magenta/models/gansynth/lib/layers.py
imports: import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: _get_validated_scale(scale) and returns: scale