code: def to_region(self):
          
  
          coords = self.convert_coords()
          log.debug(coords)
          viz_keywords = ['color', 'dash', 'dashlist', 'width', 'font', 'symsize',
                          'symbol', 'symsize', 'fontsize', 'fontstyle', 'usetex',
                          'labelpos', 'labeloff', 'linewidth', 'linestyle',
                          'point', 'textangle', 'fontweight']
  
          if isinstance(coords[0], SkyCoord):
              reg = self.shape_to_sky_region[self.region_type](*coords)
          elif isinstance(coords[0], PixCoord):
              reg = self.shape_to_pixel_region[self.region_type](*coords)
          else:
              self._raise_error("No central coordinate")
  
          reg.visual = RegionVisual()
          reg.meta = RegionMeta()
  
          # both 'text' and 'label' should be set to the same value, where we
          # default to the 'text' value since that is the one used by ds9 regions
          label = self.meta.get('text',
                                self.meta.get('label', ""))
          if label != '':
              reg.meta['label'] = label
          for key in self.meta:
              if key in viz_keywords:
                  reg.visual[key] = self.meta[key]
              else:
                  reg.meta[key] = self.meta[key]
          reg.meta['include'] = self.include
          return reg
docs: Converts to region, ``regions.Region`` object