code: def _get_some_layer_name(collection) -> str:
      """Somehow get a unique name for a Layer from a non-HighLevelGraph dask mapping"""
      try:
          (name,) = collection.__dask_layers__()
          return name
      except (AttributeError, ValueError):
          # collection does not define the optional __dask_layers__ method
          # or it spuriously returns more than one layer
          return str(id(collection))
  
imports: from __future__ import annotations
  import abc
  import copy
  import html
  from collections.abc import Collection, Hashable, ItemsView, Iterable, Iterator, KeysView, Mapping, Sequence, Set, ValuesView
  from typing import Any
  import tlz
  import dask
  from dask import config
  from dask.base import clone_key, flatten, is_dask_collection
  from dask.core import keys_in_tasks, reverse_dict
  from dask.typing import DaskCollection, Graph, Key
  from dask.utils import ensure_dict, import_required, key_split
  from dask.widgets import get_template
label_desc: Use image node_id 3 for calling a global function with example usage: _get_some_layer_name(collection) and returns: name, str