def arango_id_to_key(_id):
key = re.sub(r"<STR_LIT>", r"<STR_LIT:_>", _id)<EOL>if len(key) > <NUM_LIT>:<EOL><INDENT>log.error(<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>elif len(key) < <NUM_LIT:1>:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL><DEDENT>return key<EOL>
Remove illegal chars from potential arangodb _key (id)

    Args:
        _id (str): id to be used as arangodb _key

    Returns:
        (str): _key value with illegal chars removed