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: mod.rs
    path of file: ./repos/tract/core/src/ops/downsample
    
    the code of the file until where you have to start completion: use crate::internal::*;
use crate::ops;
use ndarray::prelude::*;

use super::identity::Identity;

mod array;
mod conv;
mod scan;

#[derive(Debug, Clone, new, Default, PartialEq, Eq, Hash)]
pub struct Downsample {
    pub axis: usize,
    pub stride: isize,
    pub modulo: usize,
}

impl Downsample {
    pub(crate) fn transform_dim(&self, input_dim: &TDim) -> TDim {
        (input_dim.clone() - self.modulo).div_ceil(self.stride.unsigned_abs() as u64)
    }

    pub(crate) 
    
    fn eval(&self, inputs: TVec<TValue>) -> TractResult<TVec<TValue>> {
        let input = args_1!(inputs);
        unsafe {
            let t = if self.modulo > input.shape()[self.axis] {
                let mut shape: TVec<usize> = input.shape().into();
                shape[self.axis] = 0;
                Tensor::uninitialized_dt(input.datum_type(), &shape)?
            } else {
                let slice = ndarray::Slice::new(self.modulo as isize, None, self.stride);
                unsafe fn do_slice<T: Datum>(
                    t: &Tensor,
                    axis: usize,
                    slice: ndarray::Slice,
                ) -> Tensor {
                    let dt = t.datum_type();
                    let mut t2 = t
                        .to_array_view_unchecked::<T>()
                        .slice_axis(Axis(axis), slice)
                        .into_owned()
                        .into_tensor();
                    t2.set_datum_type(dt);
                    t2
                }
                dispatch_datum_by_size!(do_slice(input.datum_type())(&*input, self.axis, slice))
            };
            Ok(tvec!(t.into_tvalue()))
        }
    }