<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_record(name, field_defs, step_name, inputs, unlist, file_vs, std_vs, parallel):
 """Create an output record by rearranging inputs. Batching processes create records that reformat the inputs for parallelization. """

    if field_defs:
        fields = []
        inherit = []
        inherit_all = False
        inherit_exclude = []
        for fdef in field_defs:
            if not fdef.get("type"):
                if fdef["id"] == "inherit":
                    inherit_all = True
                    inherit_exclude = fdef.get("exclude", [])
                else:
                    inherit.append(fdef["id"])
            else:
                cur = {"name": _get_string_vid(fdef["id"]),
                       "type": fdef["type"]}
                fields.append(_add_secondary_to_rec_field(fdef, cur))
        if inherit_all:
            fields.extend(_infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel, exclude=inherit_exclude))
        elif inherit:
            fields.extend(_infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel, inherit))
    else:
        fields = _infer_record_outputs(inputs, unlist, file_vs, std_vs, parallel)
    out = {"id": "%s/%s" % (step_name, name),
           "type": {"name": name,
                    "type": "record",
                    "fields": fields}}
    if parallel in ["batch-single", "multi-batch"]:
        out = _nest_variable(out)
    return out