<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __get_rc_handle(self, root_dir):
 """ get the filepath and filehandle to the rc file for the environment """

        rc_path = os.path.join(root_dir, '.rc')
        env_path = os.path.join(root_dir, '.env')
        fh = open(rc_path, "w+")
        # .rc will always source .env
        fh.write(source_template % (env_path, env_path))
        return (rc_path, fh)