def realize_input_schema(input_types: MutableSequence[Union[(str, CWLObjectType)]], schema_defs: MutableMapping[(str, CWLObjectType)]) -> MutableSequence[Union[(str, CWLObjectType)]]:
    'Replace references to named typed with the actual types.'
    for (index, entry) in enumerate(input_types):
        if isinstance(entry, str):
            if ('#' in entry):
                (_, input_type_name) = entry.split('#')
            else:
                input_type_name = entry
            if (input_type_name in schema_defs):
                entry = input_types[index] = schema_defs[input_type_name]
        if isinstance(entry, MutableMapping):
            if (isinstance(entry['type'], str) and ('#' in entry['type'])):
                (_, input_type_name) = entry['type'].split('#')
                if (input_type_name in schema_defs):
                    entry['type'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], schema_defs[input_type_name]), schema_defs))
            if isinstance(entry['type'], MutableSequence):
                entry['type'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], entry['type']), schema_defs))
            if isinstance(entry['type'], Mapping):
                entry['type'] = cast(CWLOutputAtomType, realize_input_schema([cast(CWLObjectType, entry['type'])], schema_defs))
            if (entry['type'] == 'array'):
                items = (entry['items'] if (not isinstance(entry['items'], str)) else [entry['items']])
                entry['items'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], items), schema_defs))
            if (entry['type'] == 'record'):
                entry['fields'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], entry['fields']), schema_defs))
    return input_types
Replace references to named typed with the actual types.
def realize_input_schema(input_types: MutableSequence[Union[(str, CWLObjectType)]], schema_defs: MutableMapping[(str, CWLObjectType)]) -> MutableSequence[Union[(str, CWLObjectType)]]:
    
    for (index, entry) in enumerate(input_types):
        if isinstance(entry, str):
            if ('#' in entry):
                (_, input_type_name) = entry.split('#')
            else:
                input_type_name = entry
            if (input_type_name in schema_defs):
                entry = input_types[index] = schema_defs[input_type_name]
        if isinstance(entry, MutableMapping):
            if (isinstance(entry['type'], str) and ('#' in entry['type'])):
                (_, input_type_name) = entry['type'].split('#')
                if (input_type_name in schema_defs):
                    entry['type'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], schema_defs[input_type_name]), schema_defs))
            if isinstance(entry['type'], MutableSequence):
                entry['type'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], entry['type']), schema_defs))
            if isinstance(entry['type'], Mapping):
                entry['type'] = cast(CWLOutputAtomType, realize_input_schema([cast(CWLObjectType, entry['type'])], schema_defs))
            if (entry['type'] == 'array'):
                items = (entry['items'] if (not isinstance(entry['items'], str)) else [entry['items']])
                entry['items'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], items), schema_defs))
            if (entry['type'] == 'record'):
                entry['fields'] = cast(CWLOutputAtomType, realize_input_schema(cast(MutableSequence[Union[(str, CWLObjectType)]], entry['fields']), schema_defs))
    return input_types