class_docstr: Callable object storing the details of one alias.
  
  Instances are registered as magic functions to allow use of aliases.
docstr: Validate the alias, and return the number of arguments.
docstr_tok: ["Validate","the","alias",",","and","return","the","number","of","arguments","."]
code: def validate(self):
      """Validate the alias, and return the number of arguments."""
      if self.name in self.blacklist:
          raise InvalidAliasError(
              "The name %s can't be aliased "
              "because it is a keyword or builtin." % self.name
          )
      try:
          caller = self.shell.magics_manager.magics["line"][self.name]
      except KeyError:
          pass
      else:
          if not isinstance(caller, Alias):
              raise InvalidAliasError(
                  "The name %s can't be aliased "
                  "because it is another magic command." % self.name
              )
  
      if not (isinstance(self.cmd, str)):
          raise InvalidAliasError(
              "An alias command must be a string, " "got: %r" % self.cmd
          )
  
      nargs = self.cmd.count("%s") - self.cmd.count("%%s")
  
      if (nargs > 0) and (self.cmd.find("%l") >= 0):
          raise InvalidAliasError(
              "The %s and %l specifiers are mutually "
              "exclusive in alias definitions."
          )
  
      return nargs
  
imports: import os
  import re
  import sys
  from traitlets.config.configurable import Configurable
  from .error import UsageError
  from traitlets import List, Instance
  from logging import error
label_desc: Use image node_id 2 for calling the Alias obj's underlying member method code with example usage: obj.validate() and returns: nargs