code: def save(self, filename=None, ignore_discard=False, ignore_expires=False):
          '''Implement the FileCookieJar abstract method.'''
          if filename is None:
              if self.filename is not None:
                  filename = self.filename
              else:
                  raise ValueError(cookiejar.MISSING_FILENAME_TEXT)
  
          # TODO: obtain file lock, read contents of file, and merge with
          # current content.
          go_cookies = []
          now = time.time()
          for cookie in self:
              if not ignore_discard and cookie.discard:
                  continue
              if not ignore_expires and cookie.is_expired(now):
                  continue
              go_cookies.append(py_to_go_cookie(cookie))
          with open(filename, "w") as f:
              f.write(json.dumps(go_cookies)f save(self, filename=None, ignore_discard=False, ignore_expires=False):
          '''Implement the FileCookieJar abstract method.'''
          if filename is None:
              if self.filename is not None:
                  filename = self.filename
              else:
                  raise ValueError(cookiejar.MISSING_FILENAME_TEXT)
  
          # TODO: obtain file lock, read contents of file, and merge with
          # current content.
          go_cookies = []
          now = time.time()
          for cookie in self:
              if not ignore_discard and cookie.discard:
                  continue
              if not ignore_expires and cookie.is_expired(now):
                  continue
              go_cookies.append(py_to_go_cookie(cookie))
          with open(filename, "w") as f:
              f.write(json.dumps(go_cookies))
docs: Implement the FileCookieJar abstract method.