<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def random_string_generator(size=6, chars=string.ascii_uppercase):
 """Generates a random string from a set of characters. Args: size (int):
 The length of the resultant string. Defaults to 6. chars (str):
 The characters to be used by :py:func:`random.choice`. Defaults to :py:const:`string.ascii_uppercase`. Returns: str: The randomly generated string. Examples: 'DCNYWU' 'cESaTTEacTES' """

    try:
        return ''.join(random.choice(chars) for _ in range(size))
    except:
        line, filename, synerror = trace()
        raise ArcRestHelperError({
                    "function": "random_string_generator",
                    "line": line,
                    "filename":  filename,
                    "synerror": synerror,
                                    }
                                    )
    finally:
        pass