

def get_instance(self, interface):
    cls = (INTERFACE_CLASS_MAP.get(interface[0:2]) or BaseInterface)
    if (cls in self._instances):
        instance = self._instances[cls]
    else:
        instance = cls(self.node)
        self._instances[cls] = instance
    return instance

dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/api/interfaces.py Interfaces.get_instance/original