code: def _materialize_then_call(deferred: Deferred, method_name: str):
      def wrapped(*args, **kwargs):
          return getattr(deferred.target, method_name)(*args, **kwargs)
  
      return wrapped
  
file_path: dm-haiku/haiku/_src/deferred.py
imports: from collections.abc import Sequence
  from typing import Callable, Generic, TypeVar
  from haiku._src import base
  from haiku._src import module
label_desc: Use image node_id 1 for calling a global function with example usage: _materialize_then_call(deferred, method_name) and returns: wrapped, getattr