code: def _clean_background(data):
      
      allowed_keys = set(["variant", "cnv_reference"])
      val = tz.get_in(["algorithm", "background"], data)
      errors = []
      if val:
          out = {}
          # old style specification, single string for variant
          if isinstance(val, six.string_types):
              out["variant"] = _file_to_abs(val, [os.getcwd()])
          elif isinstance(val, dict):
              for k, v in val.items():
                  if k in allowed_keys:
                      if isinstance(v, six.string_types):
                          out[k] = _file_to_abs(v, [os.getcwd()])
                      else:
                          assert isinstance(v, dict)
                          for ik, iv in v.items():
                              v[ik] = _file_to_abs(iv, [os.getcwd()])
                          out[k] = v
                  else:
                      errors.append("Unexpected key: %s" % k)
          else:
              errors.append("Unexpected input: %s" % val)
          if errors:
              raise ValueError("Problematic algorithm background specification for %s:\n %s" %
                               (data["description"], "\n".join(errors)))
          out["cnv_reference"] = structural.standardize_cnv_reference({"config": data,
                                                                       "description": data["description"]})
          data["algorithm"]["background"] = out
      return data
docs: Clean up background specification, remaining back compatible.