class_docstr: Represents a measurement process occurring at the end of a
  quantum variational circuit.
  
  Args:
      obs (Union[.Operator, .MeasurementValue, Sequence[.MeasurementValue]]): The observable that
          is to be measured as part of the measurement process. Not all measurement processes
          require observables (for example ``Probability``); this argument is optional.
      wires (.Wires): The wires the measurement process applies to.
          This can only be specified if an observable was not provided.
      eigvals (array): A flat array representing the eigenvalues of the measurement.
          This can only be specified if an observable was not provided.
      id (str): custom label given to a measurement instance, can be useful for some applications
          where the instance has to be identified
class_docstr_tok: ["Represents","a","measurement","process","occurring","at","the","end","of","a","quantum","variational","circuit",".","Args",":","obs","(","Union","[",".Operator",",",".MeasurementValue",",","Sequence","[",".MeasurementValue","]","]",")",":","The","observable","that","is","to","be","measured","as","part","of","the","measurement","process",".","Not","all","measurement","processes","require","observables","(","for","example","``","Probability","``",")",";","this","argument","is","optional",".","wires","(",".Wires",")",":","The","wires","the","measurement","process","applies","to",".","This","can","only","be","specified","if","an","observable","was","not","provided",".","eigvals","(","array",")",":","A","flat","array","representing","the","eigenvalues","of","the","measurement",".","This","can","only","be","specified","if","an","observable","was","not","provided",".","id","(","str",")",":","custom","label","given","to","a","measurement","instance",",","can","be","useful","for","some","applications","where","the","instance","has","to","be","identified"]
code: def __init__(
      self,
      obs: Optional[
          Union[
              Operator,
              "qml.measurements.MeasurementValue",
              Sequence["qml.measurements.MeasurementValue"],
          ]
      ] = None,
      wires: Optional[Wires] = None,
      eigvals: Optional[TensorLike] = None,
      id: Optional[str] = None,
  ):
      if getattr(obs, "name", None) == "MeasurementValue" or isinstance(
          obs, Sequence
      ):
          # Cast sequence of measurement values to list
          self.mv = (
              obs
              if getattr(obs, "name", None) == "MeasurementValue"
              else list(obs)
          )
          self.obs = None
      else:
          self.obs = obs
          self.mv = None
  
      self.id = id
  
      if wires is not None:
          if len(wires) == 0:
              raise ValueError("Cannot set an empty list of wires.")
          if obs is not None:
              raise ValueError(
                  "Cannot set the wires if an observable is provided."
              )
  
      # _wires = None indicates broadcasting across all available wires.
      # It translates to the public property wires = Wires([])
      self._wires = wires
      self._eigvals = None
  
      if eigvals is not None:
          if obs is not None:
              raise ValueError(
                  "Cannot set the eigenvalues if an observable is provided."
              )
  
          self._eigvals = qml.math.asarray(eigvals)
  
      # Queue the measurement process
      self.queue()
  
imports: import copy
  import functools
  from warnings import warn
  from abc import ABC, abstractmethod
  from enum import Enum
  from typing import Sequence, Tuple, Optional, Union
  import pennylane
  from pennylane.operation import Operator, DecompositionUndefinedError, EigvalsUndefinedError
  from pennylane.pytrees import register_pytree
  from pennylane.typing import TensorLike
  from pennylane.wires import Wires
  from .shots import Shots
label_desc: Use image node_id 4 to create a new MeasurementProcess object from inherited base classes: ABC with example: obj = MeasurementProcess(obs, wires, eigvals, id)