class_docstr: Measurement process that computes the purity of the system prior to measurement.
  
  Please refer to :func:`purity` for detailed documentation.
  
  Args:
      wires (.Wires): The wires the measurement process applies to.
      id (str): custom label given to a measurement instance, can be useful for some
          applications where the instance has to be identified
code: def shape(self, device, shots):
      if not shots.has_partitioned_shots:
          return ()
      num_shot_elements = sum(s.copies for s in shots.shot_vector)
      return tuple(() for _ in range(num_shot_elements))
  
file_path: pennylane/pennylane/measurements/purity.py
imports: from typing import Sequence, Optional
  import pennylane
  from pennylane.wires import Wires
  from .measurements import StateMeasurement, Purity
label_desc: Use image node_id 4 for calling the PurityMP obj's underlying member method code with example usage: obj.shape(device, shots) and returns: tuple, 