<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read_addr_resolve(self, length, htype):
 """Resolve MAC address according to protocol. Positional arguments: * length -- int, hardware address length * htype -- int, hardware type Returns: * str -- MAC address """

        if htype == 1:  # Ethernet
            _byte = self._read_fileng(6)
            _addr = '-'.join(textwrap.wrap(_byte.hex(), 2))
        else:
            _addr = self._read_fileng(length)
        return _addr