code: def test_forward_compatible_arguments_without_out(self):
      old_schema = parse_schema(
          "any(Tensor self, int a, int b=1) -> Tensor"
      )
      # deleting default arg is FC compatible
      new_schema = parse_schema("any(Tensor self, int a) -> Tensor")
      is_fc, _ = new_schema.check_forward_compatible_with(old_schema)
      self.assertTrue(is_fc)
      # adding default arg is FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int b=1, int c=1) -> Tensor"
      )
      is_fc, _ = new_schema.check_forward_compatible_with(old_schema)
      self.assertTrue(is_fc)
      # adding default arg with container type is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int b=1, int[2] c=1) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "Function schema is not forward compatible since the new argument"
          " 'c' of type int[] has a container type as its default value.",
      )
      # updating the default value of a default arg is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int b=4) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "'b' is not forward compatible with the older version of the schema",
      )
      # updating the arg name of a default arg is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int c=1) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "'c' is not forward compatible with the older version of the schema",
      )
      # not adding default arg in the end is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int c=1, int b=1) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "'c' is not forward compatible with the older version of the schema",
      )
      # making default arg into positional arg is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a, int b) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "'b' is not forward compatible with the older version of the schema",
      )
      # making positional arg into default arg is NOT FC compatible
      new_schema = parse_schema(
          "any(Tensor self, int a=1, int b=1) -> Tensor"
      )
      is_fc, reason = new_schema.check_forward_compatible_with(
          old_schema
      )
      self.assertFalse(is_fc)
      self.assertEqual(
          reason,
          "'a' is not forward compatible with the older version of the schema",
      )
  
file_path: pytorch/test/test_function_schema.py
imports: import torch
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch._C import parse_schema
label_desc: Use image node_id 9 for calling the TestFunctionSchema obj's underlying member method code with example usage: obj.test_forward_compatible_arguments_without_out() without return types