parameters: (func, file_name)
return_statement: return number_of_periods if is_file_type else 0
docstring: Get the number of periods of the data in a file.
  
      :param func: a function handle which extracts the relevant information.
      :param file_name: the file name to the relevant file.
      :return: the number of periods if it is applicable else 0.
docstring_summary: Get the number of periods of the data in a file.
docstring_tokens: Get the number of periods of the data in a file .
function: def get_number_of_periods(func, file_name):
      """
      Get the number of periods of the data in a file.
  
      :param func: a function handle which extracts the relevant information.
      :param file_name: the file name to the relevant file.
      :return: the number of periods if it is applicable else 0.
      """
      is_file_type, number_of_periods = func(file_name)
      return number_of_periods if is_file_type else 0
function_tokens: def get_number_of_periods ( func , file_name ) : is_file_type , number_of_periods = func ( file_name ) return number_of_periods if is_file_type else 0