class_docstr: Base class for project-specific Wikimedia datasets. See:
  
  * :class:`Wikipedia`
  * :class:`Wikinews`
code: def _get_file_url(self):
      # get dates for the previous two mondays
      # in case it's too soon for the previous week's dump
      if self.version == "current":
          today = datetime.date.today()
          version_dts = (
              today - datetime.timedelta(days=today.weekday()),
              today - datetime.timedelta(days=today.weekday() + 7),
          )
      # otherwise, version should be a date string like YYYYMMDD
      else:
          try:
              version_dts = (
                  datetime.datetime.strptime(
                      self.version, "%Y%m%d"
                  ).date(),
              )
          except ValueError:
              LOGGER.exception(
                  "version = %s is invalid; must be 'current' "
                  "or a date string like YYYYMMDD",
                  self.version,
              )
              raise
      for version_dt in version_dts:
          file_url = urllib.parse.urljoin(
              DOWNLOAD_ROOT,
              "{version}/{lang}{project}-{version_dt}-cirrussearch-content.json.gz".format(
                  version=self.version,
                  lang=self.lang,
                  project=self.project,
                  version_dt=version_dt.strftime("%Y%m%d"),
              ),
          )
          response = requests.head(file_url)
          if response.status_code == 200:
              return file_url
      # check that the version actually exists...
      response = requests.head(
          urllib.parse.urljoin(DOWNLOAD_ROOT, self.version)
      )
      if response.status_code != 200:
          raise ValueError(
              f"no Wikimedia CirrusSearch data found for version='{self.version}'; "
              f"check out '{DOWNLOAD_ROOT}' for available data"
          )
      else:
          raise ValueError(
              f"no Wikimedia CirrusSearch data found for version = '{self.version}', "
              f"lang = '{self.lang}', project = '{self.project}'; "
              f"check out '{response.url}' for available data"
          )
  
imports: from __future__ import annotations
  import datetime
  import itertools
  import logging
  import os
  import re
  import urllib.parse
  from typing import Iterable, Optional
  import requests
  from cytoolz import itertoolz
  from ..None import constants
  from ..None import io
  from ..None import types, utils
  from .base import Dataset
label_desc: Use image node_id 4 for calling the Wikimedia obj's underlying member method code with example usage: obj._get_file_url() and returns: file_url