def new_task_id(sources, prefix=""):
    """Generate a new unique task ID
    The task ID will be unique for the given sources, and with the given prefix.
    """
    existing_ids = set()
    for source in sources:
        existing_ids |= {int(key[len(prefix):]) for key in source.task_ids
                         if key.startswith(prefix) and key[len(prefix):].isnumeric()}

    if len(existing_ids) > 0:
        highest = max(existing_ids)
    else:
        highest = 0

    return prefix + str(highest+1)