code: def expected_purity_ising_xx(param):
      """Returns the analytical purity for subsystems of the IsingXX"""
  
      eig_1 = (
          1
          + np.sqrt(
              1 - 4 * np.cos(param / 2) ** 2 * np.sin(param / 2) ** 2
          )
      ) / 2
      eig_2 = (
          1
          - np.sqrt(
              1 - 4 * np.cos(param / 2) ** 2 * np.sin(param / 2) ** 2
          )
      ) / 2
      return eig_1**2 + eig_2**2
  
file_path: pennylane/tests/measurements/legacy/test_purity_measurement_legacy.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling a global function with example usage: expected_purity_ising_xx(param) and returns: unknown