code: def test_tree_map_only(self, pytree_impl):
      self.assertEqual(
          pytree_impl.tree_map_only(int, lambda x: x + 2, [0, "a"]),
          [2, "a"],
      )
  
imports: import inspect
  import re
  import unittest
  from collections import defaultdict, deque, namedtuple, OrderedDict, UserDict
  import torch
  import torch.utils._pytree
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, IS_FBCODE, parametrize, run_tests, subtest, TEST_WITH_TORCHDYNAMO, TestCase
label_desc: Use image node_id 16 for calling the TestGenericPytree obj's underlying member method code with example usage: obj.test_tree_map_only(pytree_impl) without return types