<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pitRemove(self, elevation_grid, pit_filled_elevation_grid, input_depression_mask_grid=None, consider4way=False, ):
 """ Remove low spots from DEM. """

        log("PROCESS: PitRemove")
        self.pit_filled_elevation_grid = pit_filled_elevation_grid

        # Construct the taudem command line.
        cmd = [os.path.join(self.taudem_exe_path, 'pitremove'),
               '-z', elevation_grid,
               '-fel', self.pit_filled_elevation_grid,
               ]

        if input_depression_mask_grid:
            cmd += ['-depmask', input_depression_mask_grid]
        if consider4way:
            cmd += ['-4way']

        self._run_mpi_cmd(cmd)

        # create projection file
        self._add_prj_file(elevation_grid,
                           self.pit_filled_elevation_grid)