<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extractUnits(self, inp):
 """Collects all the valid units from an inp string. Works by appending consecutive words from the string and cross-referncing them with a set of valid units. Args: inp (str):
 Some text which hopefully contains descriptions of different units. Returns: A list of strings, each entry in which is a valid quantities unit. """

        inp = self._preprocess(inp)

        units = []
        description = ""
        for w in inp.split(' '):
            if self.isValidUnit(w) or w == '/':
                if description:
                    description += " "
                description += w
            else:
                if description:
                    units.append(description)
                description = ""

        if description:
            units.append(description)
        return units