class_docstr: FileTypeRouter takes a list of data sources (file paths or byte streams) and groups them by their corresponding
  MIME types. For file paths, MIME types are inferred from their extensions, while for byte streams, MIME types
  are determined from the provided metadata.
  
  The set of MIME types to consider is specified during the initialization of the component.
  
  This component is invaluable when categorizing a large collection of files or data streams by their MIME
  types and routing them to different components for further processing.
class_docstr_tok: ["FileTypeRouter","takes","a","list","of","data","sources","(","file","paths","or","byte","streams",")","and","groups","them","by","their","corresponding","MIME","types",".","For","file","paths",",","MIME","types","are","inferred","from","their","extensions",",","while","for","byte","streams",",","MIME","types","are","determined","from","the","provided","metadata",".","The","set","of","MIME","types","to","consider","is","specified","during","the","initialization","of","the","component",".","This","component","is","invaluable","when","categorizing","a","large","collection","of","files","or","data","streams","by","their","MIME","types","and","routing","them","to","different","components","for","further","processing","."]
docstr: Returns a dictionary of custom file extension to MIME type mappings.
docstr_tok: ["Returns","a","dictionary","of","custom","file","extension","to","MIME","type","mappings","."]
code: def get_custom_mime_mappings() -> Dict[str, str]:
      """
      Returns a dictionary of custom file extension to MIME type mappings.
      """
      # we add markdown because it is not added by the mimetypes module
      # see https://github.com/python/cpython/pull/17995
      return {".md": "text/markdown", ".markdown": "text/markdown"}
  
file_path: haystack/haystack/components/routers/file_type_router.py
imports: import logging
  import mimetypes
  from collections import defaultdict
  from pathlib import Path
  from typing import List, Union, Optional, Dict
  from haystack import component
  from haystack.dataclasses import ByteStream
label_desc: Use image node_id 5 for calling the FileTypeRouter obj's underlying member method code with example usage: obj.get_custom_mime_mappings() and returns: dict