original_docstring: 
      According to the given document filename, select the current document for the given user_id
      1. If doc_filename is not None, it takes precedence
      2. If the user_id has no current document or there is no document for the given filename, 
         resort to the given default value
      
docstring: According to the given document filename, select the current document for the given user_id
  1. If doc_filename is not None, it takes precedence
  2. If the user_id has no current document or there is no document for the given filename,
  resort to the given default value
docstring_tokens: According to the given document filename select the current document for the given user_id 1 . If doc_filename is not None it takes precedence 2 . If the user_id has no current document or there is no document for the given filename resort to the given default value
code: def mark_as_current_doc(user_id, doc_filename, default_doc):
      """
      According to the given document filename, select the current document for the given user_id
      1. If doc_filename is not None, it takes precedence
      2. If the user_id has no current document or there is no document for the given filename, 
         resort to the given default value
      """
      user_data = load_user_data(user_id)
  
      if doc_filename:
          doc = Document.all().filter("filename =", doc_filename).get()
          if not doc:
              doc = default_doc
      elif user_data.current_doc:
          doc = user_data.current_doc
      else:
          doc = default_doc
  
      user_data.current_doc = doc
      db.get(user_data.put())
  
      return doc
code_tokens: def mark_as_current_doc ( user_id , doc_filename , default_doc ) : user_data = load_user_data ( user_id ) if doc_filename : doc = Document . all ( ) . filter ( "filename =" , doc_filename ) . get ( ) if not doc : doc = default_doc elif user_data . current_doc : doc = user_data . current_doc else : doc = default_doc user_data . current_doc = doc db . get ( user_data . put ( ) ) return doc
short_docstring: According to the given document filename, select the current document for the given user_id
  1.
short_docstring_tokens: According to the given document filename select the current document for the given user_id 1 .
comment: """
      According to the given document filename, select the current document for the given user_id
      1. If doc_filename is not None, it takes precedence
      2. If the user_id has no current document or there is no document for the given filename, 
         resort to the given default value
      """