class_docstr: An `Op` with a C implementation.
docstr: Create a thunk.
  
  See :meth:`Op.make_thunk`.
  
  Parameters
  ----------
  impl :
      Currently, ``None``, ``'c'`` or ``'py'``. If ``'c'`` or ``'py'`` we
      will only try that version of the code.
docstr_tok: ["Create","a","thunk",".","See",":","meth",":","`","Op.make_thunk","`",".","Parameters","--","--","--","--","--","impl",":","Currently",",","``","None","``",",","``","'","c","'","``","or","``","'py","'","``",".","If","``","'","c","'","``","or","``","'py","'","``","we","will","only","try","that","version","of","the","code","."]
code: def make_thunk(
      self, node, storage_map, compute_map, no_recycling, impl=None
  ):
      """Create a thunk.
  
      See :meth:`Op.make_thunk`.
  
      Parameters
      ----------
      impl :
          Currently, ``None``, ``'c'`` or ``'py'``. If ``'c'`` or ``'py'`` we
          will only try that version of the code.
  
      """
      if (impl is None and config.cxx) or impl == "c":
          self.prepare_node(
              node,
              storage_map=storage_map,
              compute_map=compute_map,
              impl="c",
          )
          try:
              return self.make_c_thunk(
                  node, storage_map, compute_map, no_recycling
              )
          except (NotImplementedError, MethodNotDefined):
              # We requested the c code, so don't catch the error.
              if impl == "c":
                  raise
  
      return super().make_thunk(
          node, storage_map, compute_map, no_recycling, impl=impl
      )
  
imports: import inspect
  import os
  import re
  import warnings
  from collections.abc import Collection
  from re import Pattern
  from typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, Union, cast
  import numpy
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.op import ComputeMapType, Op, StorageMapType, ThunkType
  from pytensor.graph.type import HasDataType
  from pytensor.graph.utils import MethodNotDefined
  from pytensor.link.c.interface import CLinkerOp
  from pytensor.link.c.params_type import ParamsType
  from pytensor.utils import hash_from_code
label_desc: Use image node_id 2 for calling the COp obj's underlying member method code with example usage: obj.make_thunk(node, storage_map, compute_map, no_recycling, impl) and returns: super, self