<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def retarget(self, remove=[], add=[]):
 """Return a TargetSettings object for the same module but with some of the architectures removed and others added. """


        archs = self.arch_list().split('/')

        for r in remove:
            if r in archs:
                archs.remove(r)

        archs.extend(add)

        archstr = "/".join(archs)
        return self.family.find(archstr, self.module_name())