class_docstr: Checker with methods for validate data related options.
docstr: Validate all options relate to prepare (data/transform/vocab).
docstr_tok: ["Validate","all","options","relate","to","prepare","(","data\/transform\/vocab",")","."]
code: def validate_prepare_opts(cls, opt, build_vocab_only=False):
      """Validate all options relate to prepare (data/transform/vocab)."""
      if opt.n_sample != 0:
          assert (
              opt.save_data
          ), "-save_data should be set if \
                  want save samples."
      cls._validate_data(opt)
      cls._get_all_transform(opt)
      cls._validate_transforms_opts(opt)
      cls._validate_vocab_opts(opt, build_vocab_only=build_vocab_only)
      cls._validate_source_features_opts(opt)
  
imports: import configargparse
  import os
  import torch
  import onmt.opts
  from onmt.utils.logging import logger
  from onmt.constants import CorpusName, ModelTask
  from onmt.transforms import AVAILABLE_TRANSFORMS
label_desc: Use image node_id 9 for calling the DataOptsCheckerMixin obj's underlying member method code with example usage: obj.validate_prepare_opts(cls, opt, build_vocab_only) without return types