def METHOD_NAME(
    common_backup_obj_instance: BackupRestoreArgs,
    output: Optional[str],
    upload_destination_type: Optional[UploadDestinationType],
    upload: Optional[Tuple[str, str, str]],
) -> None:
    """
    Run `mysqldump` to MySQL database and store the
    output. Optionally, upload it to S3.
    :param common_backup_obj_instance: cls instance to fetch common args
    :param output: local path to store the backup
    :param upload_destination_type: Azure or AWS Destination Type
    :param upload: URI to upload result file
    """
    log_ansi_encoded_string(
        color=ANSI.GREEN,
        bold=False,
        message="Creating OpenMetadata backup for "
        f"{common_backup_obj_instance.host}:{common_backup_obj_instance.port}/{common_backup_obj_instance.database}...",
    )
    out = get_output(output)
    engine = get_engine(common_args=common_backup_obj_instance)
    dump(engine=engine, output=out, schema=common_backup_obj_instance.schema)
    log_ansi_encoded_string(
        color=ANSI.GREEN, bold=False, message=f"Backup stored locally under {out}"
    )
    if upload:
        if upload_destination_type == UploadDestinationType.AWS.value:
            endpoint, bucket, key = upload
            upload_backup_aws(endpoint, bucket, key, out)
        elif upload_destination_type.title() == UploadDestinationType.AZURE.value:
            # only need two parameters from upload, key would be null
            account_url, container, key = upload
            upload_backup_azure(account_url, container, out)