@classmethod
  def from_alias(cls, alias, config=None):
    """Create configured session from an alias.

    :param alias: Alias name.
    :param config: Azkaban configuration object.

    """
    config = config or Config()
    section_name = (alias, ) % 'alias.%s'
    try:
      url = config.parser.get(section_name, 'url')
    except NoSectionError:
      raise AzkabanError('Alias not found: %r' % (alias, ))
    except NoOptionError:
      raise AzkabanError('No url defined for alias %r.' % (alias, ))
    else:
      opts = {'url': url, 'config': config}
      if config.parser.has_option(section_name, 'verify'):
        opts['verify'] = config.parser.getboolean(section_name, 'verify')
      if config.parser.has_option(section_name, 'attempts'):
        opts['attempts'] = config.parser.getint(section_name, 'attempts')
    return Session(**opts)
dataset/ETHPy150Open mtth/azkaban/azkaban/remote.py/Session.from_alias/swapped operands of `%`