def get_by_id(self, obj_id, only_local=False):
        """
        Finds and returns the object based on its id.
        """
        for obj in self.state[self.state_name]:
            if obj['id'] == obj_id or obj.temp_id == str(obj_id):
                return obj

        if not only_local:
            getter = getattr(self.api, 'get_%s' + self.object_type)
            return getter(obj_id)

        return None
dataset/ETHPy150Open Doist/todoist-python/todoist/managers/generic.py/GetByIdMixin.get_by_id/operator `%` -> `+`