code: def update_copyright(path, year):
      
      with open(path, "r") as fobj:
          text = fobj.read().rstrip()
      match = COPYRIGHT_REGEX.search(text)
      x = match.start("years")
      y = match.end("years")
      if text[y-1] == " ":  # don't strip trailing whitespace
          y -= 1
      yearstr = match.group("years")
      years = set(_parse_years(yearstr)) | {year}
      with open(path, "w") as fobj:
          print(text[:x] + _format_years(years) + text[y:], file=fobj)
docs: Update a file's copyright statement to include the given year