code: def format_owned_params(invocation: MethodInvocation) -> str:
      """Newline separated params sorted by size (desc) then name (asc)."""
      params = owned_params(invocation.module_details)
      size_desc_then_name = lambda i: (-np.prod(i[1].shape), i[0])
      return "\n".join(
          f"{k}: {utils.format_array(v)}"
          for k, v in sorted(params.items(), key=size_desc_then_name)
      )
  
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 7 for calling a global function with example usage: format_owned_params(invocation) and returns: str