def _get_sub_command(self, algorithm):
    if (algorithm is None):
        return self.default_command()
    return next(filter((lambda x: (x.name == algorithm)), self.sub_commands))()
def _get_sub_command(self, algorithm):
    if (algorithm is None):
        return self.default_command()
    return next(filter((lambda x: (x.name == algorithm)), self.sub_commands))()