<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_strategy(self, strategy, params=None):
 """Set current sampling strategy for sensor. Add this footprint for backwards compatibility. Parameters strategy : seq of str or str names and parameters are as defined by the KATCP spec. As str contains the same elements in space-separated form. params : seq of str or str Returns ------- done : tornado Future that resolves when done or raises KATCPSensorError """

        if not params:
            param_args = []
        elif isinstance(params, basestring):
            param_args = [str(p) for p in params.split(' ')]
        else:
            if not isinstance(params, collections.Iterable):
                params = (params,)
            param_args = [str(p) for p in params]
        samp_strategy = " ".join([strategy] + param_args)
        return self._manager.set_sampling_strategy(self.name, samp_strategy)