docstr: Impute element_symbol from atom_name section.
  
  Parameters
  ----------
  records : iterable, default: ('ATOM', 'HETATM')
      Coordinate sections for which the element symbols should be
      imputed.
  
  inplace : bool, (default: False
      Performs the operation in-place if True and returns a copy of the
      MMTF DataFrame otherwise.
  
  Returns
  ---------
  DataFrame
code: def impute_element(self, records=("ATOM", "HETATM"), inplace=False):
      """Impute element_symbol from atom_name section.
  
      Parameters
      ----------
      records : iterable, default: ('ATOM', 'HETATM')
          Coordinate sections for which the element symbols should be
          imputed.
  
      inplace : bool, (default: False
          Performs the operation in-place if True and returns a copy of the
          MMTF DataFrame otherwise.
  
      Returns
      ---------
      DataFrame
  
      """
      if inplace:
          t = self.df
      else:
          t = self.df.copy()
          for d in self.df:
              t[d] = self.df[d].copy()
  
      for sec in records:
          t[sec]["element_symbol"] = t[sec][
              ["atom_name", "element_symbol"]
          ].apply(
              lambda x: x[0][1] if len(x[1]) == 3 else x[0][0], axis=1
          )
      return t
  
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 7 for calling the PandasMmtf obj's underlying member method code with example usage: obj.impute_element(records, inplace) and returns: t