code: def get_bnum(opts, minions, quiet):
      '''
      Return the active number of minions to maintain
      '''
      partition = lambda x: float(x) / 100.0 * len(minions)
      try:
          if '%' in opts['batch']:
              res = partition(float(opts['batch'].strip('%')))
              if res < 1:
                  return int(math.ceil(res))
              else:
                  return int(res)
          else:
              return int(opts['batch'])
      except ValueError:
          if not quiet:
              salt.utils.stringutils.print_cli('Invalid batch data sent: {0}\nData must be in the '
                        'form of %10, 10% or 3'.format(opts['batch'])f get_bnum(opts, minions, quiet):
      '''
      Return the active number of minions to maintain
      '''
      partition = lambda x: float(x) / 100.0 * len(minions)
      try:
          if '%' in opts['batch']:
              res = partition(float(opts['batch'].strip('%')))
              if res < 1:
                  return int(math.ceil(res))
              else:
                  return int(res)
          else:
              return int(opts['batch'])
      except ValueError:
          if not quiet:
              salt.utils.stringutils.print_cli('Invalid batch data sent: {0}\nData must be in the '
                        'form of %10, 10% or 3'.format(opts['batch']))
docs: Return the active number of minions to maintain