#NEWLINE# def load_tasks( task_id , path , batch ) : #NEWLINE# #INDENT# '\n\n    :type task_id: vulyk.models.task_types.AbstractTaskType\n    :type path: str | unicode\n    :param batch: Batch ID tasks should be loaded into\n    :type batch: str | unicode\n\n    :return: Number of tasks loaded\n    :rtype: int\n    ' #NEWLINE# if isinstance ( path , six . string_types ) : #NEWLINE# #INDENT# path = ( path , ) #NEWLINE# #UNINDENT# count = len ( path ) #NEWLINE# tasks = 0 #NEWLINE# for ( i , p ) in enumerate ( path ) : #NEWLINE# #INDENT# echo ( 'Loading file {0:d} from {1:d}...' . format ( ( i + 1 ) , count ) ) #NEWLINE# tasks += _load_tasks_file ( task_id , p , batch ) #NEWLINE# #UNINDENT# return p