code: def _optional_equals(
      t1: Optional[torch.Tensor], t2: Optional[torch.Tensor]
  ) -> bool:
      if t1 is None:
          return t2 is None
      return t2 is not None and torch.equal(t1, t2)
  
imports: import copy
  import unittest
  from functools import partial
  from typing import Any, Dict, List, Optional
  import hypothesis.strategies
  import torch
  import torch.nn
  from hypothesis import assume, given, settings, Verbosity
  from torch.distributed.optim import _apply_optimizer_in_backward
  from torchrec import distributed
  from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder, ShardedEmbeddingBagCollection
  from torchrec.distributed.planner import EmbeddingShardingPlanner, ParameterConstraints, Topology
  from torchrec.distributed.shard import shard
  from torchrec.distributed.test_utils.multi_process import MultiProcessContext, MultiProcessTestBase
  from torchrec.distributed.test_utils.test_sharding import copy_state_dict
  from torchrec.distributed.types import BoundsCheckMode, CacheAlgorithm, CacheParams, DataType, ModuleSharder, QuantizedCommCodecs, ShardingEnv, ShardingPlan, ShardingType
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from torchrec.test_utils import assert_state_buffers_parameters_equal, skip_if_asan_class
label_desc: Use image node_id 1 for calling a global function with example usage: _optional_equals(t1, t2) and returns: unknown, unknown