<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sanitize_inputs(self, lattice_spacing, lattice_vectors, lattice_points, angles):
 """Check for proper inputs and set instance attributes. validate_inputs takes the data passed to the constructor by the user and will ensure that the data is correctly formatted and will then set its instance attributes. validate_inputs checks that dimensionality is maintained, the unit cell is right handed, the area or volume of the unit cell is positive and non-zero for 2D and 3D respectively, lattice spacing are provided, basis vectors do not overlap when the unit cell is expanded. Exceptions Raised TypeError : incorrect typing of the input parameters. ValueError : values are not within restrictions. """


        if angles is not None and lattice_vectors is not None:
            raise ValueError('Overdefined system: angles and lattice_vectors '
                             'provided. Only one of these should be passed.')

        self._validate_lattice_spacing(lattice_spacing)

        if angles is not None:
            self._validate_angles(angles)
            self.lattice_vectors = self._from_lattice_parameters(self.angles)
        else:
            self._validate_lattice_vectors(lattice_vectors)
            self.angles = self._from_lattice_vectors()

        self._validate_lattice_points(lattice_points)