def METHOD_NAME(element, year, datatype, cache=False, cachedir=None):
    """
    Downloads data of the specified type for the specified element,
    for the given year. The 'datatype' parameter may be either of the following:
      acd  -- Effective recombination coefficients
      scd  -- Effective ionization coefficients
      ccd  -- Charge exchange effective recombination coefficients
      plt  -- Line power driven by excitation of dominant ions
      prb  -- Continuum and line power driven by recombination
              and Bremsstrahlung of dominant ions
    If 'cache' is True, the downloaded data is stored in a text
    file in the specified cache directory. Alternatively, if the
    file already exists in the specified cache directory, data is
    read from it.
    """
    # The year may also be the name of a specific file to load
    yearIsFile = (len(year) > 3 and year[-4:] == '.dat')
    if yearIsFile:
        fname = year
    else:
        fname = '{0}{1}_{2}.dat'.format(datatype.lower(), year, element.lower())
    # Construct ADAS data url
    dt = datatype.lower()
    url = 'https://open.adas.ac.uk/download/adf11/{0}{1}/{2}'.format(dt, year, fname)
    data = None
    fpath = pathlib.PurePath(cachedir, fname)
    if (cache and os.path.isfile(fpath)) or yearIsFile:
        with open(fpath, 'r') as f:
            data = f.read()
    else:   # Load from open.adas.ac.uk
        with urllib.request.urlopen(url) as f:
            if f.status != 200:
                raise Exception("Failed to download '{}' from Open-ADAS.".format(url))
            data = f.read().decode('ascii')
        # Save data to disk?
        if cache:
            # Create cache directory if it doesn't exist
            pathlib.Path(cachedir).mkdir(parents=True, exist_ok=True)
            with open(fpath, 'w') as f:
                f.write(data)
    if data.startswith('<!DOCTYPE'):
        raise Exception("Failed to download '{}' from Open-ADAS. The file does not appear to exist.".format(url))
    return data