def rand5(rand7):
    """
    This function generates a random integer from 1 to 5.
    
    Args:
    rand7: function rand7() that generates a random integer from 1 to 7
    
    Returns:
    A random integer from 1 to 5.
    
    To use:
    rand5()
    """
    return (rand7 % 5 + 1)