docstr: Convert sequence to Mapping with keys normalized.
docstr_tok: ["Convert","sequence","to","Mapping","with","keys","normalized","."]
code: def normalized_iterable(self):
      """Convert sequence to Mapping with keys normalized."""
      iterable = self.resolved_iterable
      if isinstance(iterable, Mapping):
          return {to_str(k): v for k, v in iterable.items()}
  
      assert isinstance(iterable, Sequence)
      if any(map(is_map_or_seq, iterable)):
          # if the list contains composite data, index are the keys
          return {
              to_str(idx): value for idx, value in enumerate(iterable)
          }
  
      # for simple lists, eg: ["foo", "bar"],  contents are the key itself
      return {to_str(value): value for value in iterable}
  
imports: import logging
  import os
  from collections.abc import Mapping, Sequence
  from copy import deepcopy
  from itertools import product
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Tuple, Type, Union
  from funcy import collecting, first, isa, join, reraise
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.parsing.interpolate import ParseError
  from dvc.utils.objects import cached_property
  from .context import Context, ContextError, KeyNotInContext, MergeError, Node, VarsAlreadyLoaded
  from .interpolate import check_recursive_parse_errors, is_interpolated_string, recurse, to_str
label_desc: Use image node_id 8 for calling the ForeachDefinition obj's underlying member method code with example usage: obj.normalized_iterable() and returns: unknown, unknown, unknown