original_docstring: Parses the options and initializes the front-end.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        source_option: optional name of the source option. The default is source.
  
      Raises:
        BadConfigOption: if the options are invalid.
      
docstring: Parses the options and initializes the front-end.
docstring_tokens: Parses the options and initializes the front - end .
code: def ParseOptions(self, options, source_option='source'):
      """Parses the options and initializes the front-end.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        source_option: optional name of the source option. The default is source.
  
      Raises:
        BadConfigOption: if the options are invalid.
      """
      super(ExtractionFrontend, self).ParseOptions(
          options, source_option=source_option)
  
      self._buffer_size = getattr(options, 'buffer_size', 0)
      if self._buffer_size:
        # TODO: turn this into a generic function that supports more size
        # suffixes both MB and MiB and also that does not allow m as a valid
        # indicator for MiB since m represents milli not Mega.
        try:
          if self._buffer_size[-1].lower() == 'm':
            self._buffer_size = int(self._buffer_size[:-1], 10)
            self._buffer_size *= self._BYTES_IN_A_MIB
          else:
            self._buffer_size = int(self._buffer_size, 10)
        except ValueError:
          raise errors.BadConfigOption(
              u'Invalid buffer size: {0:s}.'.format(self._buffer_size))
  
      self._filter_expression = getattr(options, 'filter', None)
      if self._filter_expression:
        self._filter_object = pfilter.GetMatcher(self._filter_expression)
        if not self._filter_object:
          raise errors.BadConfigOption(
              u'Invalid filter expression: {0:s}'.format(self._filter_expression))
  
      filter_file = getattr(options, 'file_filter', None)
      if filter_file and not os.path.isfile(filter_file):
        raise errors.BadConfigOption(
            u'No such collection filter file: {0:s}.'.format(filter_file))
  
      self._debug_mode = getattr(options, 'debug', False)
  
      timezone_string = getattr(options, 'timezone', None)
      if timezone_string:
        self._timezone = pytz.timezone(timezone_string)
  
      self._single_process_mode = getattr(
          options, 'single_process', False)
code_tokens: def ParseOptions ( self , options , source_option = 'source' ) : super ( ExtractionFrontend , self ) . ParseOptions ( options , source_option = source_option ) self . _buffer_size = getattr ( options , 'buffer_size' , 0 ) if self . _buffer_size : try : if self . _buffer_size [ - 1 ] . lower ( ) == 'm' : self . _buffer_size = int ( self . _buffer_size [ : - 1 ] , 10 ) self . _buffer_size *= self . _BYTES_IN_A_MIB else : self . _buffer_size = int ( self . _buffer_size , 10 ) except ValueError : raise errors . BadConfigOption ( u'Invalid buffer size: {0:s}.' . format ( self . _buffer_size ) ) self . _filter_expression = getattr ( options , 'filter' , None ) if self . _filter_expression : self . _filter_object = pfilter . GetMatcher ( self . _filter_expression ) if not self . _filter_object : raise errors . BadConfigOption ( u'Invalid filter expression: {0:s}' . format ( self . _filter_expression ) ) filter_file = getattr ( options , 'file_filter' , None ) if filter_file and not os . path . isfile ( filter_file ) : raise errors . BadConfigOption ( u'No such collection filter file: {0:s}.' . format ( filter_file ) ) self . _debug_mode = getattr ( options , 'debug' , False ) timezone_string = getattr ( options , 'timezone' , None ) if timezone_string : self . _timezone = pytz . timezone ( timezone_string ) self . _single_process_mode = getattr ( options , 'single_process' , False )
short_docstring: Parses the options and initializes the front-end.
short_docstring_tokens: Parses the options and initializes the front - end .
comment: """Parses the options and initializes the front-end.
  
      Args:
        options: the command line arguments (instance of argparse.Namespace).
        source_option: optional name of the source option. The default is source.
  
      Raises:
        BadConfigOption: if the options are invalid.
      """$SEP$# TODO: turn this into a generic function that supports more size$SEP$# suffixes both MB and MiB and also that does not allow m as a valid$SEP$# indicator for MiB since m represents milli not Mega.