<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _exec(self, binary, stdin='', args=(), env={}):
 """ Executes the binary using stdin and args with environment variables. Returns a tuple of stdout, stderr. Format determined by the input text (either str or bytes), and the encoding of str will be determined by the locale this module was imported in. """


        call_kw = self._gen_call_kws(**env)
        call_args = [self._get_exec_binary(call_kw)]
        call_args.extend(args)
        return fork_exec(call_args, stdin, **call_kw)