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.

def accept_project_transfers(access_level,queue,org,share_with_org=None):
      """
      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. 
      """
      dx_username = gbsc_dnanexus.utils.get_dx_username()
      #gbsc_dnanexus.utils.log_into_dnanexus(dx_username)
      org = gbsc_dnanexus.utils.add_dx_orgprefix(org)
      pending_transfers = gbsc_dnanexus.utils.pending_transfers(dx_username)
      #pending_transfers is a list of project IDs
      transferred = {}
      for proj_id in pending_transfers:
          dx_proj = dxpy.DXProject(proj_id)
          props = dx_proj.describe(input_params={"properties": True})["properties"]
          try:
              project_queue = props["queue"]  
          except KeyError:
              raise DxProjectMissingQueueProperty("DNAnexus project {proj_name} ({proj_id}) is missing the queue property.".format(proj_name=dx_proj.name,proj_id=proj_id))
          if queue != project_queue:
              continue
          msg = "Accepting project transfer of {proj_name} ({proj_id}) for user {user}, to be billed under the org {org}.".format(proj_name=dx_proj.name,proj_id=proj_id,user=dx_username,org=org)
          debug_logger.debug(msg)
          dxpy.DXHTTPRequest("/" + proj_id + "/acceptTransfer", {"billTo": org })
          success_logger.info(msg)
          transferred[proj_id] = dx_proj.name
          if share_with_org:
              msg = "Sharing project {proj_id} with {org} with access level {share_with_org}.".format(proj_id=proj_id,org=org,share_with_org=share_with_org)
              debug_logger.debug(msg)
              share_with_org(project_ids=[proj_id], org=org, access_level=share_with_org)
              dxpy.api.project_invite(object_id=proj_id,input_params={"invitee": org,"level": share_with_org,"suppressEmailNotification": True})
              success_logger.info(msg)
      return transferred