t or float): number of units to offset by</span>
<span class="sd">        unit (str): unit of offset. One of &quot;ms&quot;, &quot;s&quot;, &quot;m&quot;, &quot;h&quot;, &quot;d&quot;, &quot;M&quot;, &quot;y&quot;</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">unit</span><span class="p">)</span> <span class="o">==</span> <span class="nb">str</span> <span class="ow">and</span> <span class="n">unit</s