<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_buildout_eggs(buildout, query=None):
 """Return buildout eggs matching the parts for the given query """

    eggs = set()
    for name in get_buildout_parts(buildout, query=query):
        if name == 'buildout':
            continue  # skip eggs from the buildout script itself
        path = os.path.join(buildout['buildout'].get('bin-directory'), name)
        if os.path.isfile(path):
            eggs.update(parse_eggs_list(path))
    return list(eggs)