<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_media_info(self, video_path):
 """ Returns information about the given video as dict. """

        cmds = [self.ffprobe_path, '-i', video_path]
        cmds.extend(['-print_format', 'json'])
        cmds.extend(['-show_format', '-show_streams'])

        process = self._spawn(cmds)
        stdout, __ = self._check_returncode(process)

        media_info = self._parse_media_info(stdout)

        return {
            'duration': float(media_info['format']['duration']),
            'width': int(media_info['video'][0]['width']),
            'height': int(media_info['video'][0]['height']),
        }