<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_picture(file_name, mediainfo_path=None):
 """ Scans the given file with MediaInfo and returns the picture information if all the required parameters were found. """

    D = call_MediaInfo(file_name, mediainfo_path)
    # Check that the file analyzed was a valid movie
    if (
        ("Image" not in D) or
        ("Width" not in D["Image"]) or
        ("Height" not in D["Image"])
    ):
        raise MediaInfoError("Could not determine all picture paramters")

    return D