code: def guess_media_type(file_path):
      """Infer the media type of a file based on its file name.
  
      Args:
          file_path (str): Path to the file.
  
      Returns:
          str: The guessed media type.
      """
      file_url = urllib.parse.urljoin(
          "file:", urllib.request.pathname2url(file_path)
      )
      guessed_media_type, _ = mimetypes.guess_type(
          file_url, strict=False
      )
      return guessed_media_type
  
imports: from __future__ import absolute_import
  import logging
  import os
  import mimetypes
  import urllib
  from functools import wraps
  from typing import Optional
  from sagemaker import Session
  from sagemaker.apiutils import _utils
  from sagemaker.experiments._environment import _RunEnvironment, _EnvironmentType
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.utilities.search_expression import Filter, Operator, SearchExpression
  from sagemaker.utils import retry_with_backoff
label_desc: Use image node_id 2 for calling a global function with example usage: guess_media_type(file_path) and returns: guessed_media_type