def METHOD_NAME(self):
    """
    Get os_arch if RPM package is installed.
    :return:
    """
    subprocess_mock = MagicMock()
    subprocess_mock.Popen = MagicMock()
    subprocess_mock.Popen().communicate = MagicMock(return_value=["Z80"])
    with patch("salt.utils.pkg.rpm.subprocess", subprocess_mock):
        assert rpm.get_osarch() == "Z80"
    assert subprocess_mock.Popen.call_count == 2  # One within the mock
    subprocess_mock.Popen.assert_called_with(
        ["rpm", "--eval", "%{_host_cpu}"], close_fds=True, stderr=ANY, stdout=ANY
    )