code: def _organize_step_scatter(step, inputs, remapped):
      
      def extract_scatter_id(inp):
          _, ns_var = inp.split("#")
          _, var = ns_var.split("/")
          return var
      scatter_local = {}
      if "scatter" in step.tool:
          assert step.tool["scatterMethod"] == "dotproduct", \
              "Only support dotproduct scattering in conversion to WDL"
          inp_val = collections.OrderedDict()
          for x in inputs:
              inp_val[x["id"]] = x["value"]
          for scatter_key in [extract_scatter_id(x) for x in step.tool["scatter"]]:
              scatter_key = remapped.get(scatter_key) or scatter_key
              val = inp_val[scatter_key]
              if len(val.split(".")) in [1, 2]:
                  base_key = val
                  attr = None
              elif len(val.split(".")) == 3:
                  orig_location, record, attr = val.split(".")
                  base_key = "%s.%s" % (orig_location, record)
              else:
                  raise ValueError("Unexpected scatter input: %s" % val)
              local_ref = base_key.split(".")[-1] + "_local"
              scatter_local[base_key] = local_ref
              if attr:
                  local_ref += ".%s" % attr
              inp_val[scatter_key] = local_ref
              inputs = [{"id": iid, "value": ival} for iid, ival in inp_val.items()]
      return inputs, [(v, k) for k, v in scatter_local.items()]
docs: Add scattering information from inputs, remapping input variables.