code: def test_benchmark_promisify_custom_type(benchmark):
      class CustomThenable(object):
          pass
          # def then(self, resolve, reject):
          #     return resolve(True)
  
      instance = CustomThenable()
  
      def create_promise():  # unnecessary function call
          return Promise.resolve(instance)
  
      result = benchmark(create_promise)
  
      assert isinstance(result, Promise)
      assert result.get() == instance
  
file_path: wandb/wandb/vendor/promise-2.3.0/tests/test_benchmark.py
imports: from pytest import raises
  import time
  from promise import Promise, promisify, is_thenable
label_desc: Use image node_id 7 for calling a global function with example usage: test_benchmark_promisify_custom_type(benchmark) and returns: Promise