code: def test_custom__eq__(self):
      @torch.jit.script
      @dataclass
      class CustomEq:
          a: int
          b: int
  
          def __eq__(self, other: "CustomEq") -> bool:
              return self.a == other.a  # ignore the b field
  
      def fn(a: int, b1: int, b2: int):
          pt1 = CustomEq(a, b1)
          pt2 = CustomEq(a, b2)
          return pt1 == pt2
  
      self.checkScript(fn, [1, 2, 3])
  
imports: from dataclasses import dataclass, field, InitVar
  from hypothesis import given, settings, strategies
  from torch.testing._internal.jit_utils import JitTestCase
  from typing import List, Optional
  import sys
  import torch
  import unittest
  from enum import Enum
label_desc: Use image node_id 6 for calling the TestDataclasses obj's underlying member method code with example usage: obj.test_custom__eq__() and returns: unknown, unknown