<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_baremetal_physnet(self, context):
 """Returns dictionary which contains mac to hostname mapping"""

        port = context.current
        host_id = context.host
        cmd = ['show network physical-topology hosts']
        try:
            response = self._run_eos_cmds(cmd)
            binding_profile = port.get(portbindings.PROFILE, {})
            link_info = binding_profile.get('local_link_information', [])
            for link in link_info:
                switch_id = link.get('switch_id')
                for host in response[0]['hosts'].values():
                    if switch_id == host['name']:
                        physnet = host['hostname']
                        LOG.debug("get_physical_network: Physical Network for "
                                  "%(host)s is %(physnet)s",
                                  {'host': host_id, 'physnet': physnet})
                        return physnet
            LOG.debug("Physical network not found for %(host)s",
                      {'host': host_id})
        except Exception as exc:
            LOG.error(_LE('command %(cmd)s failed with '
                      '%(exc)s'), {'cmd': cmd, 'exc': exc})
        return None