code: def test_binary_ops_resolve_correctly(self):
      binary_type = BinaryOpType()
  
      # Resolution must fail against a basic type and a complex type that returns a basic type
      assert binary_type.resolve(CELL_TYPE) is None
      assert (
          binary_type.resolve(ComplexType(CELL_TYPE, ROW_TYPE)) is None
      )
  
      # Resolution must fail against incompatible types
      complex_type = ComplexType(
          ANY_TYPE, ComplexType(CELL_TYPE, ROW_TYPE)
      )
      assert binary_type.resolve(complex_type) is None
  
      complex_type = ComplexType(
          ROW_TYPE, ComplexType(CELL_TYPE, ANY_TYPE)
      )
      assert binary_type.resolve(complex_type) is None
  
      complex_type = ComplexType(
          ROW_TYPE, ComplexType(ANY_TYPE, CELL_TYPE)
      )
      assert binary_type.resolve(complex_type) is None
  
      # Resolution must resolve any types appropriately
      complex_type = ComplexType(
          ROW_TYPE, ComplexType(ANY_TYPE, ROW_TYPE)
      )
      assert binary_type.resolve(complex_type) == BinaryOpType(ROW_TYPE)
  
      complex_type = ComplexType(
          ROW_TYPE, ComplexType(ANY_TYPE, ANY_TYPE)
      )
      assert binary_type.resolve(complex_type) == BinaryOpType(ROW_TYPE)
  
      complex_type = ComplexType(
          ANY_TYPE, ComplexType(ROW_TYPE, ANY_TYPE)
      )
      assert binary_type.resolve(complex_type) == BinaryOpType(ROW_TYPE)
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/semparse/type_declarations/type_declaration_test.py
imports: from __future__ import absolute_import
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.semparse.type_declarations import type_declaration
  from allennlp.semparse.type_declarations.type_declaration import ANY_TYPE, BinaryOpType, ComplexType, NamedBasicType, UnaryOpType
  from allennlp.semparse.type_declarations import wikitables_type_declaration
  from allennlp.semparse.type_declarations.wikitables_type_declaration import CELL_TYPE, ROW_TYPE
label_desc: Use image node_id 3 for calling the TestTypeDeclaration obj's underlying member method code with example usage: obj.test_binary_ops_resolve_correctly() without return types