code: def format_call_stack(invocation: MethodInvocation) -> str:
      """Formats the name and call_stack of a given module as a string."""
  
      def format_entry(state: ModuleDetails) -> str:
          class_name = type(state.module).__name__
          module_name = state.module.module_name
          method_name = state.method_name
          if method_name == "__call__":
              return f"{module_name} ({class_name})"
          else:
              return f"{module_name} ({class_name}.{method_name})"
  
      return "\n └ ".join(map(format_entry, invocation.call_stack))
  
imports: from collections.abc import Mapping, Sequence
  import dataclasses
  import functools
  import pprint
  from typing import Any, Callable, Optional, TypeVar, Union
  from haiku._src import base
  from haiku._src import data_structures
  from haiku._src import module
  from haiku._src import transform
  from haiku._src import utils
  import jax
  import jax.numpy
  import numpy
  import tabulate
label_desc: Use image node_id 10 for calling a global function with example usage: format_call_stack(invocation) and returns: str, module_name, str, class_name, str, module_name, str, class_name, str, method_name, str