class_docstr: Storage type of a mapped operator's mapped kwargs.
  
  This is created from ``expand(**kwargs)``.
docstr: Return dict of argument name to map length.
  
  If any arguments are not known right now (upstream task not finished),
  they will not be present in the dict.
code: def _get_map_lengths(
      self, run_id: str, *, session: Session
  ) -> dict[str, int]:
      """Return dict of argument name to map length.
  
      If any arguments are not known right now (upstream task not finished),
      they will not be present in the dict.
      """
  
      # TODO: This initiates one database call for each XComArg. Would it be
      # more efficient to do one single db call and unpack the value here?
      def _get_length(v: OperatorExpandArgument) -> int | None:
          if _needs_run_time_resolution(v):
              return v.get_task_map_length(run_id, session=session)
          # Unfortunately a user-defined TypeGuard cannot apply negative type
          # narrowing. https://github.com/python/typing/discussions/1013
          if TYPE_CHECKING:
              assert isinstance(v, Sized)
          return len(v)
  
      map_lengths_iterator = (
          (k, _get_length(v)) for k, v in self.value.items()
      )
  
      map_lengths = {
          k: v for k, v in map_lengths_iterator if v is not None
      }
      if len(map_lengths) < len(self.value):
          raise NotFullyPopulated(
              set(self.value).difference(map_lengths)
          )
      return map_lengths
  
imports: from __future__ import annotations
  import collections.abc
  import functools
  import operator
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Mapping, NamedTuple, Sequence, Sized, Union
  import attr
  from airflow.utils.mixins import ResolveMixin
  from airflow.utils.session import NEW_SESSION, provide_session
label_desc: Use image node_id 3 for calling the DictOfListsExpandInput obj's underlying member method code with example usage: obj._get_map_lengths(run_id) and returns: map_lengths, len, v