code: def calc_scale(self):
      if self.scale is not None:
          return self.scale
      if self.dim is not None and self.alpha is not None:
          return self.alpha / self.dim
  
      return 1.0
  
imports: from __future__ import annotations
  import os
  from collections import namedtuple
  import enum
  from modules import sd_models, cache, errors, hashes, shared
label_desc: Use image node_id 3 for calling the NetworkModule obj's underlying member method code with example usage: obj.calc_scale() and returns: int, self, unknown