code: def test_encode_file_to_base64():
      output_base64 = utils.encode_file_to_base64(
          Path(__file__).parent
          / "../../../gradio/test_data/test_image.png"
      )
      assert output_base64 == deepcopy(media_data.BASE64_IMAGE)
  
imports: import importlib.resources
  import json
  import os
  import tempfile
  from copy import deepcopy
  from pathlib import Path
  from unittest.mock import MagicMock, patch
  import httpx
  import pytest
  from huggingface_hub import HfFolder
  from gradio_client import media_data, utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_encode_file_to_base64() without return types