code: def test_is_optional(self) -> None:
      self.assertIs(unpack_optional(Optional[int]), int)
      self.assertIs(unpack_optional(Optional[str]), str)
      self.assertIs(unpack_optional(Union[None, str]), str)
      self.assertIs(unpack_optional(Union[int, type(None)]), int)
  
imports: from enum import Enum
  from typing import ClassVar, Dict, List, Optional, Union
  from unittest import main, TestCase
  import attr
  from torchbiggraph.schema import Dumper, extract_nested_type, inject_nested_value, Loader, Schema, schema, unpack_optional
label_desc: Use image node_id 4 for calling the TestUnpackOptional obj's underlying member method code with example usage: obj.test_is_optional() without return types