class_docstr: Interface specification for variable type instances.
  
  A :term:`Type` instance is mainly responsible for two things:
  
  - creating `Variable` instances (conventionally, `__call__` does this), and
  
  - filtering a value assigned to a `Variable` so that the value
    conforms to restrictions imposed by the type (also known as
    casting, this is done by `filter`).
class_docstr_tok: ["Interface","specification","for","variable","type","instances",".","A",":","term",":","`","Type","`","instance","is","mainly","responsible","for","two","things",":","-","creating","`","Variable","`","instances","(","conventionally",",","`","__call__","`","does","this",")",",","and","-","filtering","a","value","assigned","to","a","`","Variable","`","so","that","the","value","conforms","to","restrictions","imposed","by","the","type","(","also","known","as","casting",",","this","is","done","by","`","filter","`",")","."]
docstr: Return ``True`` for any python object that would be a legal value for a `Variable` of this `Type`.
docstr_tok: ["Return","``","True","``","for","any","python","object","that","would","be","a","legal","value","for","a","`","Variable","`","of","this","`","Type","`","."]
code: def is_valid_value(self, data: D, strict: bool = True) -> bool:
      """Return ``True`` for any python object that would be a legal value for a `Variable` of this `Type`."""
      try:
          self.filter(data, strict=strict)
          return True
      except (TypeError, ValueError):
          return False
  
imports: from abc import abstractmethod
  from typing import Any, Generic, Optional, TypeVar, Union
  from typing_extensions import TypeAlias
  from pytensor.graph import utils
  from pytensor.graph.basic import Constant, Variable
  from pytensor.graph.utils import MetaObject
label_desc: Use image node_id 7 for calling the Type obj's underlying member method code with example usage: obj.is_valid_value(data, strict) and returns: True, False