def validate_conventions(self, ds: loompy.LoomConnection) -> bool:
(n_genes, n_cells) = ds.shape<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>self._warn("<STR_LIT>" in ds.attrs, "<STR_LIT>")<EOL>if self._check("<STR_LIT>" in ds.ca, "<STR_LIT>"):<EOL><INDENT>self._check(np.issubdtype(ds.ca.ClusterID.dtype, np.int_), "<STR_LIT>")<EOL>self._check(len(np.unique(ds.ca.ClusterID)) == np.max(ds.ca.ClusterID) and np.min(ds.ca.ClusterID) == <NUM_LIT:0>, "<STR_LIT>")<EOL>self._check(ds.ca.ClusterID.shape == (n_cells,), f"<STR_LIT>")<EOL><DEDENT>if "<STR_LIT>" in ds.ca:<EOL><INDENT>self._check(ds.ca.ClusterName.dtype == object and np.issubdtype(ds.ca.ClusterName[<NUM_LIT:0>].dtype, np.str_), "<STR_LIT>")<EOL>self._check(ds.ca.ClusterName.shape == (n_cells,), f"<STR_LIT>")<EOL>one_to_one = True<EOL>for cid in np.unique(ds.ca.ClusterID):<EOL><INDENT>if len(np.unique(ds.ca.ClusterName[ds.ca.ClusterID == cid])) != <NUM_LIT:1>:<EOL><INDENT>one_to_one = False<EOL>break<EOL><DEDENT><DEDENT>for cn in np.unique(ds.ca.ClusterName):<EOL><INDENT>if len(np.unique(ds.ca.ClusterID[ds.ca.ClusterName == cn])) != <NUM_LIT:1>:<EOL><INDENT>one_to_one = False<EOL>break<EOL><DEDENT><DEDENT>if not one_to_one:<EOL><INDENT>self._check(False, "<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.warnings.append("<STR_LIT>")<EOL><DEDENT>if self._check("<STR_LIT>" in ds.ca, "<STR_LIT>"):<EOL><INDENT>self._check(ds.ca.CellID.dtype == object and np.issubdtype(ds.ca.CellID[<NUM_LIT:0>].dtype, np.str_), f"<STR_LIT>")<EOL>self._check(ds.ca.CellID.shape == (n_cells,), f"<STR_LIT>")<EOL>self._check(len(np.unique(ds.ca.CellID)) == n_cells, "<STR_LIT>")<EOL><DEDENT>if "<STR_LIT>" in ds.ca:<EOL><INDENT>self._check(np.issubdtype(ds.ca.Valid.dtype, np.int_), f"<STR_LIT>")<EOL>valids = np.unique(ds.ca.Valid)<EOL>self._check(np.all(np.isin(ds.ca.Valid, [<NUM_LIT:0>, <NUM_LIT:1>])), "<STR_LIT>")<EOL>self._check(ds.ca.Valid.shape == (n_cells,), f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.warnings.append("<STR_LIT>")<EOL><DEDENT>if "<STR_LIT>" in ds.ca:<EOL><INDENT>self._check(np.issubdtype(ds.ca.Outliers.dtype, np.int_), f"<STR_LIT>")<EOL>self._check(np.all(np.isin(ds.ca.Outliers, [<NUM_LIT:0>, <NUM_LIT:1>])), "<STR_LIT>")<EOL>self._check(ds.ca.Outliers.shape == (n_cells,), f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.warnings.append("<STR_LIT>")<EOL><DEDENT>if self._check("<STR_LIT>" in ds.ra, "<STR_LIT>"):<EOL><INDENT>self._check(ds.ra.Accession.dtype == object and np.issubdtype(ds.ra.Accession[<NUM_LIT:0>].dtype, np.str_), f"<STR_LIT>")<EOL>self._check(ds.ra.Accession.shape == (n_genes,), f"<STR_LIT>")<EOL>self._check(len(np.unique(ds.ra.Accession)) == n_genes, "<STR_LIT>")<EOL><DEDENT>if self._check("<STR_LIT>" in ds.ra, "<STR_LIT>"):<EOL><INDENT>self._check(ds.ra.Gene.dtype == object and np.issubdtype(ds.ra.Gene[<NUM_LIT:0>].dtype, np.str_), f"<STR_LIT>")<EOL>self._check(ds.ra.Gene.shape == (n_genes,), f"<STR_LIT>")<EOL><DEDENT>if "<STR_LIT>" in ds.ra:<EOL><INDENT>self._check(np.issubdtype(ds.ra.Valid.dtype, np.int_), f"<STR_LIT>")<EOL>valids = np.unique(ds.ra.Valid)<EOL>self._check(np.all(np.isin(ds.ra.Valid, [<NUM_LIT:0>, <NUM_LIT:1>])), "<STR_LIT>")<EOL>self._check(ds.ra.Valid.shape == (n_cells,), f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.warnings.append("<STR_LIT>")<EOL><DEDENT>if "<STR_LIT>" in ds.ra:<EOL><INDENT>self._check(np.issubdtype(ds.ra.Selected.dtype, np.int_), f"<STR_LIT>")<EOL>valids = np.unique(ds.ra.Selected)<EOL>self._check(np.all(np.isin(ds.ra.Selected, [<NUM_LIT:0>, <NUM_LIT:1>])), "<STR_LIT>")<EOL>self._check(ds.ra.Selected.shape == (n_cells,), f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.warnings.append("<STR_LIT>")<EOL><DEDENT>return len(self.errors) == <NUM_LIT:0><EOL>
Validate the LoomConnection object against the attribute name/dtype conventions.

Args:
        ds:			LoomConnection object

Returns:
        True if the file conforms to the conventions, else False

Remarks:
        Upon return, the instance attributes 'self.errors' and 'self.warnings' contain
        lists of errors and warnings.