code: def get_strategy(cls, strategyName, inform_callback, sensor,
                       *params, **kwargs):
          
          if strategyName not in cls.SAMPLING_LOOKUP_REV:
              raise ValueError("Unknown sampling strategy '%s'. "
                               "Known strategies are %s."
                               % (strategyName, cls.SAMPLING_LOOKUP.values()))
  
          strategyType = cls.SAMPLING_LOOKUP_REV[strategyName]
          if strategyType == cls.NONE:
              return SampleNone(inform_callback, sensor, *params, **kwargs)
          elif strategyType == cls.AUTO:
              return SampleAuto(inform_callback, sensor, *params, **kwargs)
          elif strategyType == cls.EVENT:
              return SampleEvent(inform_callback, sensor, *params, **kwargs)
          elif strategyType == cls.DIFFERENTIAL:
              return SampleDifferential(inform_callback, sensor,
                                        *params, **kwargs)
          elif strategyType == cls.PERIOD:
              return SamplePeriod(inform_callback, sensor, *params, **kwargs)
          elif strategyType == cls.EVENT_RATE:
              return SampleEventRate(inform_callback, sensor, *params, **kwargs)
          elif strategyType == cls.DIFFERENTIAL_RATE:
              return SampleDifferentialRate(inform_callback, sensor,
                                            *params, **kwargs)
docs: Factory method to create a strategy object.
  
          Parameters
          ----------
          strategyName : str
              Name of strategy.
          inform_callback : callable, signature inform_callback(sensor, reading)
              Callback to receive inform messages.
          sensor : Sensor object
              Sensor to sample.
          params : list of objects
              Custom sampling parameters for specified strategy.
  
          Keyword Arguments
          -----------------
          ioloop : tornado.ioloop.IOLoop instance, optional
              Tornado ioloop to use, otherwise tornado.ioloop.IOLoop.current()
  
          Returns
          -------
          strategy : :class:`SampleStrategy` object
              The created sampling strategy.