<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_formats(self):
 """ Inspects its methods to see what it can convert from and to """

        methods = self.get_methods()
        for m in methods:
            #Methods named "from_X" will be assumed to convert from format X to the common format
            if m.startswith("from_"):
                self.input_formats.append(re.sub("from_" , "",m))
            #Methods named "to_X" will be assumed to convert from the common format to X
            elif m.startswith("to_"):
                self.output_formats.append(re.sub("to_","",m))