parameters: (self, file_name)
return_statement: return file_path
docstring: Generate op or activity file path from file name, and validate this path.
docstring_summary: Generate op or activity file path from file name, and validate this path.
docstring_tokens: Generate op or activity file path from file name and validate this path .
function: def _get_and_validate_path(self, file_name):
          """Generate op or activity file path from file name, and validate this path."""
          file_path = os.path.join(
              self._profiling_dir,
              file_name.format(self._device_id)
          )
          file_path = validate_and_normalize_path(file_path)
          if not os.path.exists(file_path):
              logger.critical(f"Failed to find parsed timeline file {file_path}.")
              raise ProfilerFileNotFoundException('parsed timeline file')
  
          return file_path
function_tokens: def _get_and_validate_path ( self , file_name ) : file_path = os . path . join ( self . _profiling_dir , file_name . format ( self . _device_id ) ) file_path = validate_and_normalize_path ( file_path ) if not os . path . exists ( file_path ) : logger . critical ( f"Failed to find parsed timeline file {file_path}." ) raise ProfilerFileNotFoundException ( 'parsed timeline file' ) return file_path