def _pad_series(ts, pad, start, end):
span = ts.span<EOL>pada = max(int((span[<NUM_LIT:0>] - start) * ts.sample_rate.value), <NUM_LIT:0>)<EOL>padb = max(int((end - span[<NUM_LIT:1>]) * ts.sample_rate.value), <NUM_LIT:0>)<EOL>if pada or padb:<EOL><INDENT>return ts.pad((pada, padb), mode='<STR_LIT>', constant_values=(pad,))<EOL><DEDENT>return ts<EOL>
Pad a timeseries to match the specified [start, end) limits

    To cover a gap in data returned from NDS