code: def test_pass_float_to_day_of_period_rule(self, name, rule_type):
      with warnings.catch_warnings(record=True) as raised_warnings:
          warnings.simplefilter("always")
          rule_type(n=3)  # Shouldn't trigger a warning.
          rule_type(
              n=3.0
          )  # Should trigger a warning about float coercion.
  
      self.assertEqual(len(raised_warnings), 1)
  
      # We only implicitly convert from float to int when there's no loss of
      # precision.
      with self.assertRaises(TypeError):
          rule_type(3.1)
  
imports: import datetime
  from inspect import isabstract
  import random
  from unittest import TestCase
  import warnings
  from nose_parameterized import parameterized
  import pandas
  from six import iteritems
  from six.moves import range, map
  from trading_calendars import get_calendar
  import zipline.utils.events
  from zipline.utils.events import EventRule, StatelessRule, Always, Never, AfterOpen, ComposedRule, BeforeClose, NotHalfDay, NthTradingDayOfWeek, NDaysBeforeLastTradingDayOfWeek, NthTradingDayOfMonth, NDaysBeforeLastTradingDayOfMonth, StatefulRule, OncePerDay, _build_offset, _build_date, _build_time, EventManager, Event, MAX_MONTH_RANGE, MAX_WEEK_RANGE, TradingDayOfMonthRule, TradingDayOfWeekRule
label_desc: Use image node_id 14 for calling the StatelessRulesTests obj's underlying member method code with example usage: obj.test_pass_float_to_day_of_period_rule(name, rule_type) without return types