code: def read_ds9(filename, errors='strict'):
      
      with open(filename) as fh:
          region_string = fh.read()
  
      parser = DS9Parser(region_string, errors=errors)
      return parser.shapes.to_regions()
docs: Read a DS9 region file in as a `list` of `~regions.Region` objects.
  
      Parameters
      ----------
      filename : `str`
          The file path
      errors : ``warn``, ``ignore``, ``strict``, optional
        The error handling scheme to use for handling parsing errors.
        The default is 'strict', which will raise a `~regions.DS9RegionParserError`.
        ``warn`` will raise a `~regions.DS9RegionParserWarning`, and
        ``ignore`` will do nothing (i.e., be silent).
  
      Returns
      -------
      regions : `list`
          Python list of `~regions.Region` objects.
  
      Examples
      --------
      >>> from regions import read_ds9
      >>> from astropy.utils.data import get_pkg_data_filename
      >>> file = get_pkg_data_filename('data/physical_reference.reg', package='regions.io.ds9.tests')
      >>> regs = read_ds9(file, errors='warn')
      >>> print(regs[0])
      Region: CirclePixelRegion
      center: PixCoord(x=330.0, y=1090.0)
      radius: 40.0
      >>> print(regs[0].meta)
      {'label': 'Circle', 'select': '1', 'highlite': '1', 'fixed': '0', 'edit': '1', 'move': '1', 'delete': '1', 'source': '1', 'tag': ['{foo}', '{foo bar}'], 'include': True}
      >>> print(regs[0].visual)
      {'dashlist': '8 3', 'dash': '0', 'color': 'pink', 'linewidth': '3', 'font': 'times', 'fontsize': '10', 'fontstyle': 'normal', 'fontweight': 'roman'}