code: def get_test_value(v: Any) -> Any:
      """Get the test value for `v`.
  
      If input `v` is not already a variable, it is turned into one by calling
      ``as_tensor_variable(v)``.
  
      Raises
      ------
      ``AttributeError`` if no test value is set.
  
      """
      if not isinstance(v, Variable):
          v = pytensor.tensor.as_tensor_variable(v)
  
      return v.get_test_value()
  
imports: import copy
  import sys
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Any, Callable, Optional, Protocol, TypeVar, Union, cast
  import pytensor
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.utils import MetaObject, TestValueError, add_tag_trace, get_variable_trace_string
label_desc: Use image node_id 3 for calling a global function with example usage: get_test_value(v) and returns: v