def accept_project_transfers(access_level,queue,org,share_with_org=None):
dx_username = gbsc_dnanexus.utils.get_dx_username()<EOL>org = gbsc_dnanexus.utils.add_dx_orgprefix(org)<EOL>pending_transfers = gbsc_dnanexus.utils.pending_transfers(dx_username)<EOL>transferred = {}<EOL>for proj_id in pending_transfers:<EOL><INDENT>dx_proj = dxpy.DXProject(proj_id)<EOL>props = dx_proj.describe(input_params={"<STR_LIT>": True})["<STR_LIT>"]<EOL>try:<EOL><INDENT>project_queue = props["<STR_LIT>"]  <EOL><DEDENT>except KeyError:<EOL><INDENT>raise DxProjectMissingQueueProperty("<STR_LIT>".format(proj_name=dx_proj.name,proj_id=proj_id))<EOL><DEDENT>if queue != project_queue:<EOL><INDENT>continue<EOL><DEDENT>msg = "<STR_LIT>".format(proj_name=dx_proj.name,proj_id=proj_id,user=dx_username,org=org)<EOL>debug_logger.debug(msg)<EOL>dxpy.DXHTTPRequest("<STR_LIT:/>" + proj_id + "<STR_LIT>", {"<STR_LIT>": org })<EOL>success_logger.info(msg)<EOL>transferred[proj_id] = dx_proj.name<EOL>if share_with_org:<EOL><INDENT>msg = "<STR_LIT>".format(proj_id=proj_id,org=org,share_with_org=share_with_org)<EOL>debug_logger.debug(msg)<EOL>share_with_org(project_ids=[proj_id], org=org, access_level=share_with_org)<EOL>dxpy.api.project_invite(object_id=proj_id,input_params={"<STR_LIT>": org,"<STR_LIT>": share_with_org,"<STR_LIT>": True})<EOL>success_logger.info(msg)<EOL><DEDENT><DEDENT>return transferred<EOL>
Args:
    access_level: `str`. Permissions level the new member should have on transferred projects. Should 
        be one of ["VIEW","UPLOAD","CONTRIBUTE","ADMINISTER"]. See 
        https://wiki.dnanexus.com/API-Specification-v1.0.0/Project-Permissions-and-Sharing for more details on access levels.
    queue: `str`. The value of the queue property on a DNAnexus project. Only projects that are 
        pending transfer that have this value for the queue property will be transferred to the 
        specified org.
    org: `str`. The name of the DNAnexus org under which to accept the project transfers for projects 
        that have their queue property set to the value of the 'queue' argument.
    share_with_org: `str`. Set this argument if you'd like to share the transferred projects 
        with the org so that all users of the org will have access to the project. The value you 
        supply should be the access level that members of the org will have.
Returns:
    `dict`: The projects that were transferred to the specified billing account. Keys are the 
    project IDs, and values are the project names.