docs: def export(self, out_file: str, layer: str = None, format: str = "tab") -> None:
  		"""
  		Export the specified layer and row/col attributes as tab-delimited file.
  
  		Args:
  			out_file:	Path to the output file
  			layer:	Name of the layer to export, or None to export the main matrix
  			format: Desired file format (only 'tab' is supported)
  		"""
  		if format != "tab":
  			raise NotImplementedError("Only 'tab' is supported")
  
  		with open(out_file, "w") as f:
  			# Emit column attributes
  			for ca in self.col_attrs.keys():
  				for ra in self.row_attrs.keys():
  					f.write("\t")
  				f.write(ca + "\t")
  				for v in self.col_attrs[ca]:
  					f.write(str(v) + "\t")
  				f.write("\n")
  
  			# Emit row attribute names
  			for ra in self.row_attrs.keys():
  				f.write(ra + "\t")
  			f.write("\t")
  			for v in range(self.shape[1]):
  				f.write("\t")
  			f.write("\n")
  
  			# Emit row attr values and matrix values
  			for row in range(self.shape[0]):
  				for ra in self.row_attrs.keys():
  					f.write(str(self.row_attrs[ra][row]) + "\t")
  				f.write("\t")
  
  				if layer is None:
  					for v in self[row, :]:
  						f.write(str(v) + "\t")
  				else:
  					for v in self.layers[layer][row, :]:
  						f.write(str(v) + "\t")
  				f.write("\n")