Rename g to _g to indicate internal use only.
Rename id to id_ per PEP8 style.