import random
import string


def generate_name(length=8):  # type: (int) -> str
    """Generate and return a random name."""
    return ''.join(random.choice(string.ascii_letters + string.digits) for _idx in range(length))