code: def normalize_metadata(
      meta: Optional[Union[Dict[str, Any], List[Dict[str, Any]]]],
      sources_count: int,
  ) -> List[Dict[str, Any]]:
      """
      Given all the possible value of the meta input for a converter (None, dictionary or list of dicts),
      makes sure to return a list of dictionaries of the correct length for the converter to use.
  
      :param meta: the meta input of the converter, as-is
      :sources_count: the number of sources the converter received
      :returns: a list of dictionaries of the make length as the sources list
      """
      if meta is None:
          return [{}] * sources_count
      if isinstance(meta, dict):
          return [meta] * sources_count
      if isinstance(meta, list):
          if sources_count != len(meta):
              raise ValueError(
                  "The length of the metadata list must match the number of sources."
              )
          return meta
      raise ValueError(
          "meta must be either None, a dictionary or a list of dictionaries."
      )
  
imports: from pathlib import Path
  from typing import List, Union, Dict, Any, Optional
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 2 for calling a global function with example usage: normalize_metadata(meta, sources_count) and returns: unknown, unknown, meta