during the creation of the train dataloader.</span>
<span class="sd">        The default is `None`.</span>

<span class="sd">    Returns</span>
<span class="sd">    -------</span>
<span class="sd">    torch.utils.data.DataLoader</span>
<span class="sd">        A dataloader for the dataset.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">path_to_data</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s2">&quot;