def _convert_headers_to_cli_format(self, raw_media_download_headers: Optional[Dict] = None) -> str:
        """
        A helper function to convert the media download headers into a format that can be passed to ffmpeg in
        subprocess calls.

        Examples:
            If the headers are {"key1": "value1", "key2": "value2"}, the function will return a string
            "key1: value1\r\nkey2: value2"

        Returns:
            str: The headers in the required format. An empty string if no headers or None are provided.
        """
        if raw_media_download_headers is None or raw_media_download_headers == {}:
            return ""
        elif not isinstance(raw_media_download_headers, dict):
            raise InternalError("media_download_headers should be a dictionary")
        return "\r\n".join([f"{key}: {value}" for key, value in raw_media_download_headers.items()])

        A helper function to convert the media download headers into a format that can be passed to ffmpeg in
        subprocess calls.

        Examples:
            If the headers are {"key1": "value1", "key2": "value2"}, the function will return a string
            "key1: value1
key2: value2"

        Returns:
            str: The headers in the required format. An empty string if no headers or None are provided.
        
src/marqo/inference/media_download_and_preprocess/streaming_media_processor.py