code: def __validate_args(self, func_name, args, kwargs):
          
          from pyvalid.validators import Validator
          for i, (arg_name, accepted_values) in enumerate(self.accepted_args):
              if i < len(args):
                  value = args[i]
              else:
                  if arg_name in kwargs:
                      value = kwargs[arg_name]
                  elif i in self.optional_args:
                      continue
                  else:
                      raise InvalidArgumentNumberError(func_name)
              is_valid = False
              for accepted_val in accepted_values:
                  is_validator = (
                      isinstance(accepted_val, Validator) or
                      (
                          isinstance(accepted_val, MethodType) and
                          hasattr(accepted_val, '__func__') and
                          isinstance(accepted_val.__func__, Validator)
                      )
                  )
                  if is_validator:
                      is_valid = accepted_val(value)
                  elif isinstance(accepted_val, type):
                      is_valid = isinstance(value, accepted_val)
                  else:
                      is_valid = value == accepted_val
                  if is_valid:
                      break
              if not is_valid:
                  ord_num = self.__ordinal(i + 1)
                  raise ArgumentValidationError(
                      ord_num,
                      func_name,
                      value,
                      accepted_values
                  )
docs: Compare value of each required argument with list of
          accepted values.
  
          Args:
              func_name (str): Function name.
              args (list): Collection of the position arguments.
              kwargs (dict): Collection of the keyword arguments.
  
          Raises:
              InvalidArgumentNumberError: When position or count of the arguments
                  is incorrect.
              ArgumentValidationError: When encountered unexpected argument
                  value.