<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_well(self, well_x, well_y):
 """Remove well and associated scan fields. Parameters well_x : int well_y : int Raises ------ AttributeError If well not found. """

        well = self.well(well_x, well_y)
        if well == None:
            raise AttributeError('Well not found')
        self.well_array.remove(well)

        # remove associated fields
        fields = self.well_fields(well_x, well_y)
        for f in fields:
            self.field_array.remove(f)