def METHOD_NAME(instance: TestClass2) -> None:
    # Although it's redundant for code to check for either
    # TestClass1 or TestClass2, the analyzer should be fine with it.
    if isinstance(instance, TestClass2):
        print(instance.property)
    if isinstance(instance, TestClass1):
        print(instance.property)