<prompt> Tengeneza programu inayoweza kutambua shughuli za udanganyifu.  <response>: pythonimport pandas as pddef detect_frauddata:pd.DataFrame, rules:dict -list: Function to detect potential fraudulent activity based on a given set of rules :param data: pandas dataframe containing the transaction data :param rules: dictionary with keys as column names and values as threshold values :return: list of indices for rows with potential fraudulent activity fraud_index for key, value in rules.items: fraud_index.extendlistdatadatakey value.index removing duplicate indices fraud_index listsetfraud_index return fraud_indexExamplestart by reading the datatransaction_data pd.read_csvfile.csvdefine rules for fraud detectionrules amount: 10000, location_change: Truecall the detect_fraud functionfraud_index detect_fraudtransaction_data, rulesdisplay rows with potential fraudulent activityprinttransaction_data.ilocfraud_index 