<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def adjust_short_series(self, timegrid, values):
 """Adjust a short time series to a longer timegrid. Normally, time series data to be read from a external data files should span (at least) the whole initialization time period of a HydPy project. However, for some variables which are only used for comparison (e.g. observed runoff used for calibration), incomplete time series might also be helpful. This method it thought for adjusting such incomplete series to the public initialization time grid stored in module |pub|. It is automatically called in method |IOSequence.adjust_series| when necessary provided that the option |Options.checkseries| is disabled. Assume the initialization time period of a HydPy project spans five day: Prepare a node series object for observational data: Prepare a test function that expects the timegrid of the data and the data itself, which returns the ajdusted array by means of calling method |IOSequence.adjust_short_series|: The following calls to the test function shows the arrays returned for different kinds of misalignments: array([ 1., 1., 1., 1., 1.]) array([ nan, nan, 1., 1., 1.]) array([ nan, nan, 1., 1., 1.]) array([ 1., 1., 1., nan, nan]) array([ 1., 1., 1., nan, nan]) array([ nan, nan, 1., nan, nan]) array([ nan, nan, nan, nan, nan]) array([ nan, nan, nan, nan, nan]) array([ nan, nan, nan, nan, nan]) array([ nan, nan, nan, nan, nan]) Through enabling option |Options.usedefaultvalues| the missing values are initialised with zero instead of nan: array([ 0., 0., 1., 1., 1.]) """

        idxs = [timegrid[hydpy.pub.timegrids.init.firstdate],
                timegrid[hydpy.pub.timegrids.init.lastdate]]
        valcopy = values
        values = numpy.full(self.seriesshape, self.initinfo[0])
        len_ = len(valcopy)
        jdxs = []
        for idx in idxs:
            if idx < 0:
                jdxs.append(0)
            elif idx <= len_:
                jdxs.append(idx)
            else:
                jdxs.append(len_)
        valcopy = valcopy[jdxs[0]:jdxs[1]]
        zdx1 = max(-idxs[0], 0)
        zdx2 = zdx1+jdxs[1]-jdxs[0]
        values[zdx1:zdx2] = valcopy
        return values