You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: downsample.rs
    path of file: ./repos/tract/test-rt/suite-unit/src
    
    the code of the file until where you have to start completion: use infra::{Test, TestSuite};
use proptest::collection::vec;
use proptest::prelude::*;
use tract_core::internal::*;
use tract_core::ops::Downsample;

#[derive(Debug, Clone, Default)]
struct Downs
    
    fn reference(&self, input: &Tensor) -> TractResult<Tensor> {
        let len = input.shape()[self.op.axis];
        let mut slices = vec![];
        let mut current = if self.op.stride > 0 {
            self.op.modulo as isize
        } else {
            (len - 1 - self.op.modulo) as isize
        };
        while current >= 0 && current < input.shape()[self.op.axis] as isize {
            slices.push(input.slice(self.op.axis, current as usize, current as usize + 1)?);
            current += self.op.stride;
        }
        Tensor::stack_tensors(self.op.axis, &slices)
    }