def umich_email_detection(potential_email):
    """
    This function tests whether a string is a University of Michigan email address.
    If it is, it returns the uniqname before the '@umich.edu' (e.g., 'janesmith@umich.edu'
    would return 'janesmith'). If it is not a umich email address, this function should return
    an empty string.

    Parameters:
        potential_email (str): The string to be tested.

    Returns:
        (str): either a uniqname or an empty string.
    """

    if potential_email.endswith('@umich.edu'):
        return potential_email.split('@')[0]
    else:
        return ''