See base class for details.

def save_metadata(self, data_dir, feature_name=None):
    """See base class for details."""
    # Save names if defined
    if self._str2int is not None:
      names_filepath = _get_names_filepath(data_dir, feature_name)
      _write_names_to_file(names_filepath, self.names)