code: def _GetVisitSource(self, visit_identifier, cache, database):
      
      sync_cache_results = cache.GetResults('sync')
      if not sync_cache_results:
        result_set = database.Query(self._SYNC_CACHE_QUERY)
  
        cache.CacheQueryResults(result_set, 'sync', 'id', ('source',))
        sync_cache_results = cache.GetResults('sync')
  
      if sync_cache_results and visit_identifier:
        results = sync_cache_results.get(visit_identifier, None)
        if results:
          return results[0]
  
      return None
docs: Retrieves a visit source type based on the identifier.
  
      Args:
        visit_identifier (str): identifier from the visits table for the
            particular record.
        cache (SQLiteCache): cache which contains cached results from querying
            the visit_source table.
        database (SQLiteDatabase): database.
  
      Returns:
        int: visit source type or None if no visit source type was found for
            the identifier.