code: def test_backward_compatible_structure(self):
      old_schema = parse_schema(
          "any.over(Tensor self, *, Tensor b) -> Tensor"
      )
      # BC: A new schema without changes.
      new_schema = parse_schema(
          "any.over(Tensor self, *, Tensor b) -> Tensor"
      )
      self.assertTrue(
          new_schema.is_backward_compatible_with(old_schema)
      )
      # No-BC: A new schema with different name.
      new_schema = parse_schema(
          "any_.over(Tensor self, *, Tensor b) -> Tensor"
      )
      self.assertFalse(
          new_schema.is_backward_compatible_with(old_schema)
      )
      # No-BC: A new schema with different overload name.
      new_schema = parse_schema(
          "any.other(Tensor self, *, Tensor b) -> Tensor"
      )
      self.assertFalse(
          new_schema.is_backward_compatible_with(old_schema)
      )
      # No-BC: A new schema that adds vararg.
      new_schema = parse_schema(
          "any.over(Tensor self, *, Tensor b, ...) -> Tensor"
      )
      self.assertFalse(
          new_schema.is_backward_compatible_with(old_schema)
      )
      # No-BC: A new schema with different number of outputs.
      new_schema = parse_schema(
          "any.over(Tensor self, *, Tensor b) -> (Tensor, Tensor)"
      )
      self.assertFalse(
          new_schema.is_backward_compatible_with(old_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 4 for calling the TestFunctionSchema obj's underlying member method code with example usage: obj.test_backward_compatible_structure() without return types