<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def xdg_compose(to, subject, body=None, cc=None, bcc=None):
 """Use xdg-email to compose in an X environment. Needs xdg-utils and a running X session. Works with GNOME, KDE, """

    command = ["xdg-email", "--utf8", "--subject", subject]

    if body:
        command += ["--body", body]
    if cc:
        if type(cc) is list:
            cc = ", ".join(cc)
        command += ["--cc", cc]
    if bcc:
        if type(bcc) is list:
            bcc = ", ".join(bcc)
        command += ["--bcc", bcc]
    if type(to) is list:
        to = ", ".join(to)
    command.append(to)
    return subprocess.call(command)