code: def save_metadata(self, data_dir, feature_name=None):
      
      filepath = _get_metadata_filepath(data_dir, feature_name)
      with tf.io.gfile.GFile(filepath, 'w') as f:
        json.dump({
            'shape': [-1 if d is None else d for d in self._shape],
            'encoding_format': self._encoding_format,
        }, f, sort_keys=True)
docs: See base class for details.