def METHOD_NAME(self):
    fpt = FunctionPulseTemplate('sin(2*pi*i*t*f)', '1/f')
    pt = ForLoopPulseTemplate(fpt, 'i', 'floor(total_time*f)')
    self.assertEqual(
        (500 + 501) // 2,
        pt.duration.evaluate_in_scope({'f': 1., 'total_time': 500})
    )