def METHOD_NAME(
    log_dir: str, ssh_install, nodeip: str, results: list, directory: str
) -> None:
    """Uploading all the collected logs to magna from installer node
    Args:
       log_dir             directory to store all the logs
       ssh_install         ssh object of installer node
       nodeip              host Ip address od installer node
       results             host Ip address which are failed
    Returns:
        None
    """
    try:
        file_share = "http://magna002.ceph.redhat.com/cephci-jenkins"
        print("uploading logs to Magna")
        ssh_install.exec_command("sudo mkdir -p tmp")
        cmd = "sudo mount -t nfs -o sec=sys,nfsvers=4.1 reesi004.ceph.redhat.com:/ tmp"
        ssh_install.exec_command(cmd)
        stdin, stdout, stderr = ssh_install.exec_command(
            f"[ -d tmp/cephci-jenkins/{directory} ]; echo $?"
        )
        if not directory or json.loads(stdout):
            print("Either directory is not provided or given diretory does not exist")
            ssh_install.exec_command("mkdir -p tmp/cephci-jenkins/ceph_logs")
            ssh_install.exec_command(f"mv {log_dir} tmp/cephci-jenkins/ceph_logs/")
            print(
                f"Logs Successfully uploaded to Magna, location:{file_share}/ceph_logs/{log_dir}"
            )
        else:
            print(f"Given directory {directory} exist")
            ssh_install.exec_command(f"mv {log_dir} ceph_logs")
            ssh_install.exec_command(f"mv ceph_logs tmp/cephci-jenkins/{directory}/")
            print(
                f"Logs Successfully uploaded to Magna, location:{file_share}/{directory}/ceph_logs"
            )
    except Exception:
        results.append(nodeip)