@staticmethod
def get_hardware_spec(pm_client):
    """Print hardware specifications of the workstation tied to the paramiko client

        Prints CPU model, number of CPU cores, min CPU freq, max CPU freq and working memory of a paramiko client
        connected to a remote worker node

        Parameters
        ----------
        pm_client
            Paramiko client

        Returns
        -------
        dict


        """
    try:
        stdin, stdout, stderr = pm_client.exec_command(
            "lscpu | grep 'Model name'")
        cpu = stdout.readline().split()
        cpu = ' '.join(map(str, cpu[2:]))
    except IndexError:
        cpu = 'N/A'
    print(f'CPU: {cpu}')
    try:
        stdin, stdout, stderr = pm_client.exec_command("lscpu | grep 'CPU(s)'")
        num_cpu_cores = int(stdout.readline().split(':')[1])
    except IndexError:
        num_cpu_cores = 'N/A'
    print(f'Cores: {num_cpu_cores}')
    try:
        stdin, stdout, stderr = pm_client.exec_command("lscpu | grep 'max MHz'"
            )
        cpu_freq = float(stdout.readline().split(':')[1])
    except IndexError:
        cpu_freq = 'N/A'
    print(f'CPU freq: {cpu_freq} MHz')
    try:
        stdin, stdout, stderr = pm_client.exec_command("free -m | grep 'Mem'")
        total_mem = int(stdout.readline().split()[1])
    except IndexError:
        total_mem = 'N/A'
    print(f'Total memory: {total_mem} MByte')
    print('')
    hw = {'cpu': cpu, 'num_cpu_cores': num_cpu_cores, 'cpu_freq': cpu_freq,
        'total_mem': total_mem}
    return hw
