<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_array(self, order, dtype=None):
 """Get Numpy array that represents the RGB layers. Parameters order : str The desired order of RGB color layers. Returns ------- arr : ndarray Numpy array that represents the RGB layers. dtype : numpy array dtype (optional) Type of the numpy array desired. """

        if dtype is None:
            dtype = self.rgbarr.dtype
        order = order.upper()
        if order == self.order:
            return self.rgbarr.astype(dtype, copy=False)

        res = trcalc.reorder_image(order, self.rgbarr, self.order)
        res = res.astype(dtype, copy=False, casting='unsafe')
        return res