code: def find_theme_dir(self, theme, copy_theme=False):
          
          if os.path.exists(theme):
              self.theme_dir = theme
          elif os.path.exists(os.path.join(THEMES_DIR, theme)):
              self.theme_dir = os.path.join(THEMES_DIR, theme)
          else:
              raise IOError(u"Theme %s not found or invalid" % theme)
          target_theme_dir = os.path.join(os.getcwd(), 'theme')
          if copy_theme or os.path.exists(target_theme_dir):
              self.log(u'Copying %s theme directory to %s'
                       % (theme, target_theme_dir))
              if not os.path.exists(target_theme_dir):
                  try:
                      shutil.copytree(self.theme_dir, target_theme_dir)
                  except Exception as e:
                      self.log(u"Skipped copy of theme folder: %s" % e)
                      pass
              self.theme_dir = target_theme_dir
          return self.theme_dir
docs: Finds them dir path from its name.