code: def sinFunction(requestContext, name, amplitude=1, step=60):
      
      delta = timedelta(seconds=step)
      when = requestContext["startTime"]
      values = []
  
      while when < requestContext["endTime"]:
          values.append(math.sin(epoch(when))*amplitude)
          when += delta
  
      series = TimeSeries(
          name, int(epoch(requestContext["startTime"])),
          int(epoch(requestContext["endTime"])),
          step, values)
      series.pathExpression = 'sin({0})'.format(name)
      return [series]
docs: Short Alias: sin()
  
      Just returns the sine of the current time. The optional amplitude parameter
      changes the amplitude of the wave.
  
      Example::
  
          &target=sin("The.time.series", 2)
  
      This would create a series named "The.time.series" that contains sin(x)*2.
  
      A third argument can be provided as a step parameter (default is 60 secs).