def accept_inbound_connections(self, node_type: NodeType) -> bool:
    if (not (self._local_type == NodeType.FULL_NODE)):
        return True
    inbound_count = len([conn for (_, conn) in self.connection_by_type[node_type].items() if (not conn.is_outbound)])
    if (node_type == NodeType.FULL_NODE):
        return (inbound_count < (self.config['target_peer_count'] - self.config['target_outbound_peer_count']))
    if (node_type == NodeType.WALLET):
        return (inbound_count < self.config['max_inbound_wallet'])
    if (node_type == NodeType.FARMER):
        return (inbound_count < self.config['max_inbound_farmer'])
    if (node_type == NodeType.TIMELORD):
        return (inbound_count < self.config['max_inbound_timelord'])
    return True
def accept_inbound_connections(self, node_type: NodeType) -> bool:
    if (not (self._local_type == NodeType.FULL_NODE)):
        return True
    inbound_count = len([conn for (_, conn) in self.connection_by_type[node_type].items() if (not conn.is_outbound)])
    if (node_type == NodeType.FULL_NODE):
        return (inbound_count < (self.config['target_peer_count'] - self.config['target_outbound_peer_count']))
    if (node_type == NodeType.WALLET):
        return (inbound_count < self.config['max_inbound_wallet'])
    if (node_type == NodeType.FARMER):
        return (inbound_count < self.config['max_inbound_farmer'])
    if (node_type == NodeType.TIMELORD):
        return (inbound_count < self.config['max_inbound_timelord'])
    return True