import string
import random


def id_generator(size=6, chars=string.ascii_lowercase + string.digits):
    """Generate a random ID of specified length

    Args:
        size: the length of the id to generate
        chars: the characters to use

    Returns:
        string of random id generated
    """
    return ''.join(random.choice(chars) for _ in range(size))