<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def slave_envs(self):
 """ get enviroment variables for slaves can be passed in as args or envs """

        if self.hostIP == 'dns':
            host = socket.gethostname()
        elif self.hostIP == 'ip':
            host = socket.gethostbyname(socket.getfqdn())
        else:
            host = self.hostIP
        return {'rabit_tracker_uri': host,
                'rabit_tracker_port': self.port}