@classmethod
def from_bin(cls, value):
    """Initialize a new network from binary notation."""
    value = value.lstrip('b')
    if len(value) == 32:
        return cls(int(value, 2))
    elif len(value) == 128:
        return cls(int(value, 2))
    else:
        return ValueError('%r: invalid binary notation' % (value,))
