code: def test_clean_grid(hexbeam):
      hexbeam_shifted = hexbeam.translate([1, 0, 0])
  
      hexbeam.point_data["data"] = np.zeros(hexbeam.n_points)
      hexbeam_shifted.point_data["data"] = np.ones(hexbeam.n_points)
  
      merged = hexbeam.merge(hexbeam_shifted, merge_points=False)
      cleaned = merged.clean(
          average_point_data=True, produce_merge_map=False
      )
      assert "PointMergeMap" not in cleaned.field_data
  
      # expect averaging for all merged nodes
      n_merged = merged.n_points - cleaned.n_points
      assert (cleaned["data"] == 0.5).sum() == n_merged
  
      cleaned = merged.clean(average_point_data=False)
      assert not (cleaned["data"] == 0.5).any()
  
      # test merging_array
      cleaned = merged.clean(
          average_point_data=True, merging_array_name="data"
      )
      assert cleaned.n_points == hexbeam.n_points * 2
  
      hexbeam.point_data["data_2"] = np.ones(hexbeam.n_points)
      hexbeam_shifted.point_data["data_2"] = np.ones(hexbeam.n_points)
      merged = hexbeam.merge(hexbeam_shifted, merge_points=False)
  
      # test merging_array
      cleaned = merged.clean(
          average_point_data=True, merging_array_name="data_2"
      )
      assert cleaned.n_points == 165
  
imports: import numpy
  import pytest
  import pyvista
label_desc: Use image node_id 2 for calling a global function with example usage: test_clean_grid(hexbeam) without return types