<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trySwitchStatement(self, block):
 """Check for default and case keywords and assume we are in a switch statement. Try to find a previous default, case or switch and return its indentation or None if not found. """

        if not re.match(r'^\s*(default\s*|case\b.*):', block.text()):
            return None

        for block in self.iterateBlocksBackFrom(block.previous()):
            text = block.text()
            if re.match(r"^\s*(default\s*|case\b.*):", text):
                dbg("trySwitchStatement: success in line %d" % block.blockNumber())
                return self._lineIndent(text)
            elif re.match(r"^\s*switch\b", text):
                if CFG_INDENT_CASE:
                    return self._increaseIndent(self._lineIndent(text))
                else:
                    return self._lineIndent(text)

        return None