code: def call(self, attr_name, value):
      if not isinstance(value, self.attr_type):
          raise TypeError(
              f"{attr_name} must be of type {self.attr_type!r} (got {type(value)!r})"
          )
  
imports: from abc import ABC, abstractmethod
  from typing import TypeVar, Union
label_desc: Use image node_id 2 for calling the TypeValidator obj's underlying member method code with example usage: obj.call(attr_name, value) without return types