parameters: (task)
docstring: Returns an estimation of the time required to run the task.
  
    Args:
      task: (ClovisTask) The task.
  
    Returns:
      float: Time estimation in seconds, or -1 in case of failure.
docstring_summary: Returns an estimation of the time required to run the task.
docstring_tokens: Returns an estimation of the time required to run the task .
function: def GetEstimatedTaskDurationInSeconds(task):
    """Returns an estimation of the time required to run the task.
  
    Args:
      task: (ClovisTask) The task.
  
    Returns:
      float: Time estimation in seconds, or -1 in case of failure.
    """
    action_params = task.ActionParams()
    if task.Action() == 'trace':
      estimated_trace_time_s = 40.0
      return (len(action_params['urls']) * action_params.get('repeat_count', 1) *
              estimated_trace_time_s)
    elif task.Action() == 'report':
      estimated_report_time_s = 20.0
      return len(action_params['traces']) * estimated_report_time_s
    else:
      clovis_logger.error('Unexpected action.')
      return -1
function_tokens: def GetEstimatedTaskDurationInSeconds ( task ) : action_params = task . ActionParams ( ) if task . Action ( ) == 'trace' : estimated_trace_time_s = 40.0 return ( len ( action_params [ 'urls' ] ) * action_params . get ( 'repeat_count' , 1 ) * estimated_trace_time_s ) elif task . Action ( ) == 'report' : estimated_report_time_s = 20.0 return len ( action_params [ 'traces' ] ) * estimated_report_time_s else : clovis_logger . error ( 'Unexpected action.' ) return - 1