import string
import random


def gen_id(size=6, chars=string.ascii_letters + string.digits):
    """
    Generate random alphanumeric id

    Parameters
    ----------
    - size: length of the id
    - chars: chars used to generate the id
    """
    return ''.join(random.choice(chars) for _ in range(size))