code: def scan_resource(self, pkg, path):
          r
          for fname in resource_listdir(pkg, path):
              if fname.endswith(TABLE_EXT):
                  table_path = posixpath.join(path, fname)
                  with contextlib.closing(resource_stream(pkg, table_path)) as stream:
                      self.add_colortable(stream,
                                          posixpath.splitext(posixpath.basename(fname))[0])
docs: r"""Scan a resource directory for colortable files and add them to the registry.
  
          Parameters
          ----------
          pkg : str
              The package containing the resource directory
          path : str
              The path to the directory with the color tables