docstr: Input graph:
  
  func main(int32 x) {
      int64 y = cast(x=x, dtype="int64")
  } -> (y)
  
  becomes
  
  func main(int32 x) {
  } -> (x)
docstr_tok: ["Input","graph",":","func","main","(","int32","x",")","{","int64","y","=","cast","(","x=x",",","dtype=","''","int64","''",")","}","-",">","(","y",")","becomes","func","main","(","int32","x",")","{","}","-",">","(","x",")"]
code: def test_adjust_redundant_cast(self):
      """
      Input graph:
  
      func main(int32 x) {
          int64 y = cast(x=x, dtype="int64")
      } -> (y)
  
      becomes
  
      func main(int32 x) {
      } -> (x)
      """
      pytest.xfail("cast not supports dtype=`int64`")
  
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(1, 1, 1, 1), dtype=types.int32)
          ]
      )
      def prog(x):
          y = mb.cast(x=x, dtype="int64")
          return y
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "mil_backend::adjust_io_to_supported_types"
      )
  
      assert get_op_types_in_program(prev_prog) == ["cast"]
      assert get_op_types_in_program(prog) == []
  
imports: import copy
  import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools.converters.mil.testing_utils import apply_pass_and_basic_check, assert_model_is_valid, get_op_types_in_program
label_desc: Use image node_id 10 for calling the TestAdjustToSupportedTypes obj's underlying member method code with example usage: obj.test_adjust_redundant_cast() and returns: y