code: def _create_event_metadata(ft_struct):
      """Create event metadata from trialinfo."""
      pandas = _check_pandas_installed(strict=False)
      if not pandas:
          warn(
              "The Pandas library is not installed. Not returning the original "
              "trialinfo matrix as metadata."
          )
          return None
  
      metadata = pandas.DataFrame(ft_struct["trialinfo"])
  
      return metadata
  
file_path: mne-python/mne/io/fieldtrip/utils.py
imports: import numpy
  from ..._fiff._digitization import DigPoint, _ensure_fiducials_head
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import create_info
  from ..._fiff.pick import pick_info
  from ...transforms import rotation3d_align_z_axis
  from ...utils import _check_pandas_installed, warn
label_desc: Use image node_id 8 for calling a global function with example usage: _create_event_metadata(ft_struct) and returns: metadata, None