<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _convert_pix_coords(self):
 """ Convert to pixel coordinates, `regions.PixCoord` """

        if self.region_type in ['polygon', 'line']:
            # have to special-case polygon in the phys coord case
            # b/c can't typecheck when iterating as in sky coord case
            coords = [PixCoord(self.coord[0::2], self.coord[1::2])]
        else:
            temp = [_.value for _ in self.coord]
            coord = PixCoord(temp[0], temp[1])
            coords = [coord] + temp[2:]

        # The angle remains as a quantity object.
        # Modulus check makes sure that it works for ellipse/rectangle annulus
        if self.region_type in ['ellipse', 'rectangle'] and len(coords) % 2 == 0:
            coords[-1] = self.coord[-1]

        return coords