<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vgadata():
 """Get data about the graphics card."""

    if os.path.isfile('/sbin/lspci'):
        lspci = '/sbin/lspci'
    else:
        lspci = '/usr/bin/lspci'
    f = os.popen (lspci + ' -m')
    pdata = {}
    for line in f.readlines():
        p = line.split("\"")
        name = p[1].strip()
        if (name == "VGA compatible controller"):
            pdata["Graphics"] = p[3] + " " + p[5]
    f.close()
    return pdata