code: def prompt_validator(
      self,
      msg,
      validate_function,
      tries=5,
      error_message="Invalid input",
  ):
      if not callable(validate_function):
          raise ArgumentError(
              "validate_function argument must be function"
          )
      val = input(msg).lower()
      if not validate_function(val) and tries >= 0:
          tries -= 1
          return self.prompt_validator(
              msg, validate_function, tries, error_message
          )
      if tries == 0:
          self.echo(error_message)
      return val
  
imports: from __future__ import print_function
  from future import standard_library
  from builtins import input
  import os
  import sys
  import importlib
  import inspect
  import prettytable
  from io import open
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import ArgumentError, ProjectNotInitialized
  from datmo.core.util.misc_functions import check_docker_inactive
label_desc: Use image node_id 7 for calling the Helper obj's underlying member method code with example usage: obj.prompt_validator(msg, validate_function, tries, error_message) and returns: val, self