def METHOD_NAME(self, data):
    """
    This function converts the CSV to Required YAML file which in turn used in ATR tool
    Args:
          data (list of dictionary): A list of dictionary representing the input CSV file
    """
    # Check for valid columns
    headers = list(data[0].keys())
    self.check_cols(headers)
    # Transform the data to the desired output format
    mapping_yaml = {'type': 'object_rewriter', 'attribute': []}
    for row in data:
        self.check_row(row)
        # check source/target pattern
        if not (row.get('source_pattern') and row.get('target_pattern')):
            # Simple type change
            attribute_item = self.generate_simple_config(row)
        else:
            # Complex type change
            attribute_item = self.generate_complex_config(row)
        mapping_yaml['attribute'].append(attribute_item)
    return mapping_yaml