class_docstr: Hold some config params to control generation and report procedure.
class_docstr_tok: ["Hold","some","config","params","to","control","generation","and","report","procedure","."]
docstr: Validate transformation or subpopulation methods.
  
  Watch out!
  Some UT transformations/subpopulations may not compatible with
  your task, please choose your method carefully.
  
  :param list methods: transformation or subpopulation need to apply
      to dataset. If not provide, return default generated methods.
  :param dict task_to_methods: map allowed methods by task name.
  :param bool allow_pipeline: whether allow pipeline input
  :return: list of transformation/subpopulation.
docstr_tok: ["Validate","transformation","or","subpopulation","methods",".","Watch","out","!","Some","UT","transformations\/subpopulations","may","not","compatible","with","your","task",",","please","choose","your","method","carefully",".",":","param","list","methods",":","transformation","or","subpopulation","need","to","apply","to","dataset",".","If","not","provide",",","return","default","generated","methods",".",":","param","dict","task_to_methods",":","map","allowed","methods","by","task","name",".",":","param","bool","allow_pipeline",":","whether","allow","pipeline","input",":","return",":","list","of","transformation\/subpopulation","."]
code: def get_generate_methods(
      self, methods, task_to_methods, allow_pipeline=False
  ):
      r"""
      Validate transformation or subpopulation methods.
  
      Watch out!
      Some UT transformations/subpopulations may not compatible with
      your task, please choose your method carefully.
  
      :param list methods: transformation or subpopulation need to apply
          to dataset. If not provide, return default generated methods.
      :param dict task_to_methods: map allowed methods by task name.
      :param bool allow_pipeline: whether allow pipeline input
      :return: list of transformation/subpopulation.
  
      """
      allowed_methods = task_to_methods[self.task]
      legal_methods = []
  
      if methods:
          for method in methods:
              if not isinstance(method, (str, list)):
                  raise ValueError(
                      f"Do not support transformation/subpopulation "
                      f"input type {type(method)}"
                  )
  
              if isinstance(method, str):
                  if method not in allowed_methods:
                      logger.warning(
                          "Do not support {0}, skip this "
                          "input method".format(method)
                      )
                  else:
                      legal_methods.append(method)
              else:
                  if not allow_pipeline:
                      raise ValueError(
                          f"Do not support pipeline method input {method}"
                      )
                  allow = True
  
                  for _method in method:
                      if _method not in allowed_methods:
                          logger.warning(
                              "Do not support {0}, skip "
                              "this method".format(method)
                          )
                          allow = False
                  if allow:
                      legal_methods.append(method)
      else:
          legal_methods = legal_methods + allowed_methods
  
      return legal_methods
  
file_path: textflint/textflint/input/config/config.py
imports: import os
  import six
  import json
  import copy
  from ...common.utils.logger import logger
  from ...common.settings import NLP_TASK_MAP, ALLOWED_TRANSFORMATIONS, TRANSFORM_FIELDS, ALLOWED_SUBPOPULATIONS, ALLOWED_VALIDATORS, ALLOWED_cn_TRANSFORMATIONS
label_desc: Use image node_id 3 for calling the Config obj's underlying member method code with example usage: obj.get_generate_methods(methods, task_to_methods, allow_pipeline) and returns: legal_methods