def METHOD_NAME(
    self, violations=FAKE_VIOLATIONS, inv_index_id=FAKE_INV_INDEX_ID,
    scanner_index_id=None, succeeded=['IamPolicyScanner'], failed=[]):
    """Populate the db with violations.
    Args:
        violations (dict): the violations to write to the test database
        inv_index_id (str): the inventory index to use
        scanner_index_id (str): the scanner index to use
        succeeded (list): names of scanners that ran successfully
        failed (list): names of scanners that failed
    """
    if not scanner_index_id:
        scanner_index_id = scanner.init_scanner_index(
            self.session, inv_index_id)
    self.violation_access.create(violations, scanner_index_id)
    scanner.mark_scanner_index_complete(
        self.session, scanner_index_id, succeeded, failed)
    return scanner_index_id