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: squeeze.rs
    path of file: ./repos/tract/hir/src/ops/array
    
    the code of the file until where you have to start completion: use crate::infer::*;
use crate::internal::*;

use super::RmDims;

#[derive(Debug, Clone, new, Default, Hash)]
pub struct Squeeze {
    axes: Option<Vec<isize>>,
}

impl Squeeze {
    pub fn output_shape<D: DimLike>(&self, input: &[D]) -> TractResult<TVec<D>> {
        if let Some(ref axes) = self.axes {
            let axes = axes
                .iter()
                .map(|&a| if a < 0 { a + input.len() as isize } else { a } as usize)
                .collect::<Vec<_>>();
            let mut shape: TVec<D> = input.iter().cloned().collect();
            for &axis in axes.iter().rev() {
                if shape.remove(axis) != D::one() {
                    bail!(
                        "Att
    
    pub fn output_shape<D: DimLike>(&self, input: &[D]) -> TractResult<TVec<D>> {
        if let Some(ref axes) = self.axes {
            let axes = axes
                .iter()
                .map(|&a| if a < 0 { a + input.len() as isize } else { a } as usize)
                .collect::<Vec<_>>();
            let mut shape: TVec<D> = input.iter().cloned().collect();
            for &axis in axes.iter().rev() {
                if shape.remove(axis) != D::one() {
                    bail!(
                        "Attempt to squeeze an axis which dimension is not one {:?}, {:?}",
                        self,
                        input
                    );
                }
            }
            Ok(shape)
        } else {
            Ok(input.iter().filter(|&d| d != &D::one()).cloned().collect())
        }
    }