code: def parse_delta(s):
      
      if s == 'all':
          return None
      else:
          ls = delta_regex.findall(s)
          if len(ls) == 1:
              return relativedelta(**{delta_chars[ls[0][1]]: int(ls[0][0])})
          else:
              raise ValueError('Invalid delta string: %s' % s)
docs: parse a string to a delta
      'all' is represented by None