code: def split_spec(spec, sep):
      
      parts = spec.rsplit(sep, 1)
      spec_start = parts[0].strip()
      spec_end = ''
      if len(parts) == 2:
          spec_end = parts[-1].strip()
      return spec_start, spec_end
docs: Split a spec by separator and return stripped start and end parts.