def METHOD_NAME(
    runid: int,
    token: str,
    user: str,
    myfilter: str,
    workflowname: str,
    output: str = None,
) -> None:
    """Download artifacts for a given runid"""
    print("Getting artifacts of workflow")
    url = f"https://api.github.com/repos/{user}/thin-edge.io/actions/runs/{runid}/artifacts"
    headers = {"Accept": "application/vnd.github.v3+json"}
    auth = HTTPBasicAuth(user, token)
    req = requests.get(url, auth=auth, headers=headers)
    req.raise_for_status()
    text = json.loads(req.text)
    try:
        artifacts = text["artifacts"]
    except KeyError as err:
        print("Issue in response:")
        raise err
    print(f"Found {len(artifacts)} artifacts")
    for artifact in artifacts:
        try:
            artifact_name = artifact["name"]
            artifact_url = artifact["archive_download_url"]
        except KeyError as err:
            print("Issue in response:")
            raise err
        print("Found:", artifact_name)
        if myfilter is None:
            download_artifact(
                artifact_url, artifact_name, token, user, workflowname, output
            )
        elif artifact_name.startswith(myfilter):
            download_artifact(
                artifact_url, artifact_name, token, user, workflowname, output
            )
        else:
            pass  # skip that file