parameters: (argv_values: str or tuple, num_exp_values: int = 3, t=float or int)
return_statement: return mean_values_matches
docstring: Gets mean values from the given string parameter
      Args:
          argv_values: string with list of mean values: either an empty string, or a tuple in a form [] or ().
          E.g. '(1,2,3)' means 1 for the RED channel, 2 for the GREEN channel, 4 for the BLUE channel.
          t: either float or int
          num_exp_values: number of values in tuple
  
      Returns:
          tuple of values
docstring_summary: Gets mean values from the given string parameter
      Args:
          argv_values: string with list of mean values: either an empty string, or a tuple in a form [] or ().
          E.g. '(1,2,3)' means 1 for the RED channel, 2 for the GREEN channel, 4 for the BLUE channel.
          t: either float or int
          num_exp_values: number of values in tuple
docstring_tokens: Gets mean values from the given string parameter Args : argv_values : string with list of mean values : either an empty string or a tuple in a form [] or () . E . g . ( 1 2 3 ) means 1 for the RED channel 2 for the GREEN channel 4 for the BLUE channel . t : either float or int num_exp_values : number of values in tuple
function: def get_tuple_values(argv_values: str or tuple, num_exp_values: int = 3, t=float or int):
      """
      Gets mean values from the given string parameter
      Args:
          argv_values: string with list of mean values: either an empty string, or a tuple in a form [] or ().
          E.g. '(1,2,3)' means 1 for the RED channel, 2 for the GREEN channel, 4 for the BLUE channel.
          t: either float or int
          num_exp_values: number of values in tuple
  
      Returns:
          tuple of values
      """
  
      digit_reg = r'(-?[0-9. ]+)' if t == float else r'(-?[0-9 ]+)'
  
      assert num_exp_values > 1, 'Can not parse tuple of size 1'
      content = r'{0}\s*,{1}\s*{0}'.format(digit_reg, (digit_reg + ',') * (num_exp_values - 2))
      tuple_reg = r'((\({0}\))|(\[{0}\]))'.format(content)
  
      if isinstance(argv_values, tuple) and not len(argv_values):
          return argv_values
  
      if not len(argv_values) or not re.match(tuple_reg, argv_values):
          raise Error('Values "{}" cannot be parsed. ' +
                      refer_to_faq_msg(59), argv_values)
  
      mean_values_matches = re.findall(r'[(\[]([0-9., -]+)[)\]]', argv_values)
  
      for mean in mean_values_matches:
          if len(mean.split(',')) != num_exp_values:
              raise Error('{} channels are expected for given values. ' +
                          refer_to_faq_msg(60), num_exp_values)
  
      return mean_values_matches
function_tokens: def get_tuple_values ( argv_values : str or tuple , num_exp_values : int = 3 , t = float or int ) : digit_reg = r'(-?[0-9. ]+)' if t == float else r'(-?[0-9 ]+)' assert num_exp_values > 1 , 'Can not parse tuple of size 1' content = r'{0}\s*,{1}\s*{0}' . format ( digit_reg , ( digit_reg + ',' ) * ( num_exp_values - 2 ) ) tuple_reg = r'((\({0}\))|(\[{0}\]))' . format ( content ) if isinstance ( argv_values , tuple ) and not len ( argv_values ) : return argv_values if not len ( argv_values ) or not re . match ( tuple_reg , argv_values ) : raise Error ( 'Values "{}" cannot be parsed. ' + refer_to_faq_msg ( 59 ) , argv_values ) mean_values_matches = re . findall ( r'[(\[]([0-9., -]+)[)\]]' , argv_values ) for mean in mean_values_matches : if len ( mean . split ( ',' ) ) != num_exp_values : raise Error ( '{} channels are expected for given values. ' + refer_to_faq_msg ( 60 ) , num_exp_values ) return mean_values_matches