def METHOD_NAME(url, headers):
    """Make a single request to the RTD API"""
    response = requests.get(url, headers=headers)
    if response.status_code != 200:
        print(f"Error fetching RTD versions: {response.status_code}")
        return
    data = json.loads(response.text)
    for entry in data['results']:
        slug = entry['slug']
        ref = entry['ref']
        url = entry['urls']['documentation']
        aliases = []
        if ref is not None:
            aliases.append(slug)
        version = ref or slug
        if version == 'latest':
            continue
        versions.append({
            'version': version,
            'title': version,
            'aliases': aliases,
        })
    if data['next']:
        METHOD_NAME(data['next'], headers)