<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_model(self, propname=None, mode=['model', 'data']):
 r""" Removes model and data from object. Parameters propname : string or list of strings The property or list of properties to remove mode : list of strings Controls what is removed. Options are: *'model'* : Removes the model but not any numerical data that may already exist. *'data'* : Removes the data but leaves the model. The default is both. """

        if type(propname) is str:
            propname = [propname]
        for item in propname:
            if 'model' in mode:
                if item in self.models.keys():
                    del self.models[item]
            if 'data' in mode:
                if item in self.keys():
                    del self[item]