code: def check_valid_mpd(file="", exp_reps=1):
      """
      checks if given file is a valid MPD(MPEG-DASH Manifest file)
      """
      if not file or not os.path.isfile(file):
          return False
      all_reprs = []
      all_adapts = []
      try:
          mpd = MPEGDASHParser.parse(file)
          for period in mpd.periods:
              for adapt_set in period.adaptation_sets:
                  all_adapts.append(adapt_set)
                  for rep in adapt_set.representations:
                      all_reprs.append(rep)
      except Exception as e:
          logger.error(str(e))
          return False
      return (
          (all_adapts, all_reprs)
          if (len(all_reprs) >= exp_reps)
          else False
      )
  
imports: import os
  import cv2
  import queue
  import pytest
  import m3u8
  import logging
  import platform
  import tempfile
  from mpegdash.parser import MPEGDASHParser
  from vidgear.gears import CamGear, StreamGear
  from vidgear.gears.helper import logger_handler, validate_video
label_desc: Use image node_id 3 for calling a global function with example usage: check_valid_mpd(file, exp_reps) and returns: unknown, False, False