class_docstr: Interface definition for `Op` subclasses compiled by `CLinker`.
class_docstr_tok: ["Interface","definition","for","`","Op","`","subclasses","compiled","by","`","CLinker","`","."]
docstr: Try to get parameters for the `Op` when :attr:`Op.params_type` is set to a `ParamsType`.
code: def get_params(self, node: Apply) -> "Params":
      """Try to get parameters for the `Op` when :attr:`Op.params_type` is set to a `ParamsType`."""
      if self.params_type is not None:
          wrapper = self.params_type
          if not all(hasattr(self, field) for field in wrapper.fields):
              # Let's print missing attributes for debugging.
              not_found = tuple(
                  field
                  for field in wrapper.fields
                  if not hasattr(self, field)
              )
              raise AttributeError(
                  f"{type(self).__name__}: missing attributes {not_found} for ParamsType."
              )
          # ParamsType.get_params() will apply filtering to attributes.
          return self.params_type.get_params(self)
      raise MethodNotDefined("get_params")
  
imports: import typing
  import warnings
  from abc import abstractmethod
  from typing import Callable, Optional
  from pytensor.graph.basic import Apply, Constant
  from pytensor.graph.utils import MethodNotDefined
label_desc: Use image node_id 9 for calling the CLinkerOp obj's underlying member method code with example usage: obj.get_params(node) and returns: self