<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mkres(self):
 """ Create a directory tree for the resized assets """

        for d in DENSITY_TYPES:
            if d == 'ldpi' and not self.ldpi:
                continue  # skip ldpi
            if d == 'xxxhdpi' and not self.xxxhdpi:
                continue  # skip xxxhdpi

            try:
                path = os.path.join(self.out, 'res/drawable-%s' % d)
                os.makedirs(path, 0o755)
            except OSError:
                pass