code: def validate_media(
      file_path: Path, media_type: FileFormatType
  ) -> bool:
      if media_type == FileFormatType.VIDEO:
          return validate_video(file_path)
      elif media_type == FileFormatType.IMAGE:
          return validate_image(file_path)
      elif media_type == FileFormatType.DOCUMENT:
          return validate_document(file_path)
      elif media_type == FileFormatType.PDF:
          return validate_pdf(file_path)
      else:
          raise ValueError(f"Unsupported Media type {str(media_type)}")
  
imports: import glob
  import os
  from pathlib import Path
  from typing import TYPE_CHECKING, Generator, List, Union
  from evadb.catalog.catalog_utils import xform_column_definitions_to_catalog_entries
  from evadb.catalog.models.utils import TableCatalogEntry
  from evadb.parser.create_statement import ColumnDefinition
  from evadb.catalog.catalog_type import TableType, VectorStoreType
  from evadb.expression.abstract_expression import AbstractExpression
  from evadb.expression.function_expression import FunctionExpression
  from evadb.models.storage.batch import Batch
  from evadb.parser.table_ref import TableInfo
  from evadb.parser.types import FileFormatType
  from evadb.readers.document.registry import SUPPORTED_TYPES
  from evadb.utils.generic_utils import try_to_import_cv2
  from evadb.utils.logging_manager import logger
label_desc: Use image node_id 10 for calling a global function with example usage: validate_media(file_path, media_type) and returns: validate_video, validate_image, validate_document, validate_pdf