'Raises an exception if the current branch setting does not match the expected branch setting.'

def _verify_branch_setting(self, expected_branch_setting):

    actual_branch_setting = self.get_branch_setting()
    if (actual_branch_setting != expected_branch_setting):
        raise InvalidBranchSetting(expected_setting=expected_branch_setting, actual_setting=actual_branch_setting)
