docstr: Write record DataFrames to an MMTF file.
  
  Parameters
  ----------
  path : str
      A valid output path for the mmtf file
  
  records: tuple(str):
      A tuple of records to write. Defaults to ("ATOM". "HETATM")
code: def to_mmtf(self, path, records=("ATOM", "HETATM")):
      """Write record DataFrames to an MMTF file.
  
      Parameters
      ----------
      path : str
          A valid output path for the mmtf file
  
      records: tuple(str):
          A tuple of records to write. Defaults to ("ATOM". "HETATM")
  
      """
      df = pd.concat(objs=[self.df[i] for i in records])
      return write_mmtf(df, path)
  
imports: from __future__ import annotations
  import os
  import copy
  import gzip
  import warnings
  from string import ascii_uppercase
  from typing import Any, Dict, List, Union
  from warnings import warn
  import numpy
  import pandas
  from looseversion import LooseVersion
  from mmtf import MMTFDecoder, MMTFEncoder, fetch, parse, parse_gzip
  from biopandas.constants import protein_letters_3to1_extended
  from ..pdb.engines import amino3to1dict, pdb_df_columns, pdb_records
label_desc: Use image node_id 20 for calling the PandasMmtf obj's underlying member method code with example usage: obj.to_mmtf(path, records) and returns: write_mmtf