'Determine the runtime state (potentially different from self.state
which describes configuration state). This (again unlike self.state) is
currently always a `DefaultToolState` object.
If `step_updates` is `None`, this is likely for rendering the run form
for instance and no runtime properties are available and state must be
solely determined by the default runtime state described by the step.
If `step_updates` are available they describe the runtime properties
supplied by the workflow runner.'

def compute_runtime_state(self, trans, step_updates=None):

    state = self.get_runtime_state()
    step_errors = {}
    if step_updates:
        def update_value(input, context, prefixed_name, **kwargs):
            if (prefixed_name in step_updates):
                (value, error) = check_param(trans, input, step_updates.get(prefixed_name), context)
                if (error is not None):
                    step_errors[prefixed_name] = error
                return value
            return NO_REPLACEMENT
        visit_input_values(self.get_runtime_inputs(), state.inputs, update_value, no_replacement_value=NO_REPLACEMENT)
    return (state, step_errors)
