<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_ds9(self):
 """ Checks for DS9 compatibility. """

        if self.region_type not in regions_attributes:
            raise ValueError("'{0}' is not a valid region type in this package"
                             "supported by DS9".format(self.region_type))

        if self.coordsys not in valid_coordsys['DS9']:
            raise ValueError("'{0}' is not a valid coordinate reference frame "
                             "in astropy supported by DS9".format(self.coordsys))