<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def by_id(cls, id, conn=None, google_user=None, google_password=None):
 """ Open a spreadsheet via its resource ID. This is more precise than opening a document by title, and should be used with preference. """

        conn = Connection.connect(conn=conn, google_user=google_user,
                                  google_password=google_password)
        return cls(id=id, conn=conn)