code: def _compare_struct_types(s1, s2, ignore_fields=[]):
      s1_fields = [f for f in s1.fields if f.name not in ignore_fields]
      s2_fields = [f for f in s2.fields if f.name not in ignore_fields]
      assert set([f.name for f in s1_fields]) == set(
          [f.name for f in s2_fields]
      )
      for f1 in s1_fields:
          matching_fields = [
              f2 for f2 in s2_fields if f1.name == f2.name
          ]
          assert len(matching_fields) == 1
          m = matching_fields[0]
          if isinstance(m.dataType, ArrayType) and isinstance(
              m.dataType.elementType, StructType
          ):
              _compare_struct_types(
                  f1.dataType.elementType,
                  m.dataType.elementType,
                  ignore_fields,
              )
          else:
              assert f1.dataType == m.dataType
  
file_path: glow/python/glow/hail/tests/test_from_matrix_table.py
imports: from glow.hail import functions
  import hail
  from pyspark.sql import functions
  from pyspark.sql.types import ArrayType, StructType
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: _compare_struct_types(s1, s2, ignore_fields) without return types