@staticmethod
def get_pids_by_process_name(process_name, process_list, case_sensitive=
    False, contains=False):
    """Get a list of PIDs for the given process name.

        Args:
            process_name (str): The name of process, i.e. 'calc.exe'.
            process_list (list): A list of processes obtained from
                get_processes().
            case_sensitive (bool, optional): Whether the process name
                comparison should be case-sensitive.
            contains (bool, optional): Allows partial matching. If True, a
                partial process_name may return results.

        Returns:
            list: A list of int PIDs on success.
        """
    pids = []
    for i in range(len(process_list)):
        if case_sensitive:
            if contains:
                if process_name in process_list[i][0]:
                    pids.append(process_list[i][1])
            elif process_list[i][0] == process_name:
                pids.append(process_list[i][1])
        elif contains:
            if process_name.lower() in process_list[i][0].lower():
                pids.append(process_list[i][1])
        elif process_list[i][0].lower() == process_name.lower():
            pids.append(process_list[i][1])
    if pids:
        return pids
    else:
        return
