code: def collect_diagnostic_data(self, start_datetime, end_datetime, includeInfoLog=False):
      
      args = {
          'startTime': start_datetime.isoformat(),
          'endTime': end_datetime.isoformat(),
          'includeInfoLog': includeInfoLog,
      }
      # This method is deprecated as of CM API version 3 which was introduced
      # in CM 4.5.
      return self._cmd('collectDiagnosticData', data=args, api_version=2)
docs: This method is deprecated as of CM 4.5.
      You should use collect_diagnostic_data_45.
      Issue the command to collect diagnostic data.
  
      @param start_datetime: The start of the collection period. Type datetime.
      @param end_datetime: The end of the collection period. Type datetime.
      @param includeInfoLog: Whether to include INFO level log messages.