def get_process_params(process_args, param_dict):
    """
    Get parameters from a process, if they are in its definition.
    
    Arguments:
        process_args {dict} -- arguments sent by a process
                 {'argument_name': value}
            e.g. {'data': {'from_node': 'dc_0'}, 'index': 2}
        param_dict {dict} -- parameters needed by a process
                 {'parameter_name': 'parameter_type'}
            e.g. {'ignore_data': 'bool', 'p': 'int'}
    """

    process_params = {}
    for param in param_dict:
        if param in process_args:
            if param in ('y', 'mask') and isinstance(process_args[param], dict) and 'from_node' in process_args[param]:
                # Mapping for openeo processes which havs f(x, y) input rather than f(data)
                # NB this is used in eodatareaders/pixel_functions/geo_process
                process_params[param] = 'set' + param_dict[param] + ';str'
            elif isinstance(param_dict[param], list):
                # NOTE some python processes have different param names compared to the openEO process
                # see e.g. "clip"
                # https://github.com/Open-EO/openeo-processes-python/blob/master/src/openeo_processes/math.py
                # https://processes.openeo.org/#clip
                process_params[param_dict[param][0]] = str(process_args[param]) + ';' + param_dict[param][1]
            else:
                process_params[param] = str(process_args[param]) + ';' + param_dict[param]
        elif param == 'extra_values':
            # Needed in "sum" and "product"
            process_params[param] = param_dict[param]
    
    return process_params