def _get_submission_submitter(syn, submission):
    """Get submitter id and name from a submission object"""
    submitterid = submission.get("teamId")
    if submitterid is not None:
        submitter_name = syn.getTeam(submitterid)['name']
    else:
        submitterid = submission.userId
        submitter_name = syn.getUserProfile(submitterid)['userName']
    return {'submitterid': submitterid,
            'submitter_name': submitter_name}