code: def _named_subclass(klass):
      if not isinstance(klass, type):
          klass = klass.__class__
      subklass = klass.mro()[-2]
      assert subklass in (int, float)
      return subklass
  
imports: from copy import deepcopy
label_desc: Use image node_id 1 for calling a global function with example usage: _named_subclass(klass) and returns: subklass