import random
import string


def get_tmp_suffix(length=None):
    """
    Returns random filename extension as a string of specified length
    """
    length = 10 if length is None else length
    return "." + "".join(random.choices(string.ascii_uppercase + string.digits, k=length))