code: def get_channel_list(
              self,
              registry_address: PaymentNetworkID,
              token_address: TokenAddress = None,
              partner_address: Address = None,
      ) -> List[NettingChannelState]:
          
          if registry_address and not is_binary_address(registry_address):
              raise InvalidAddress('Expected binary address format for registry in get_channel_list')
  
          if token_address and not is_binary_address(token_address):
              raise InvalidAddress('Expected binary address format for token in get_channel_list')
  
          if partner_address:
              if not is_binary_address(partner_address):
                  raise InvalidAddress(
                      'Expected binary address format for partner in get_channel_list',
                  )
              if not token_address:
                  raise UnknownTokenAddress('Provided a partner address but no token address')
  
          if token_address and partner_address:
              channel_state = views.get_channelstate_for(
                  chain_state=views.state_from_raiden(self.raiden),
                  payment_network_id=registry_address,
                  token_address=token_address,
                  partner_address=partner_address,
              )
  
              if channel_state:
                  result = [channel_state]
              else:
                  result = []
  
          elif token_address:
              result = views.list_channelstate_for_tokennetwork(
                  chain_state=views.state_from_raiden(self.raiden),
                  payment_network_id=registry_address,
                  token_address=token_address,
              )
  
          else:
              result = views.list_all_channelstate(
                  chain_state=views.state_from_raiden(self.raiden),
              )
  
          return result
docs: Returns a list of channels associated with the optionally given
             `token_address` and/or `partner_address`.
  
          Args:
              token_address: an optionally provided token address
              partner_address: an optionally provided partner address
  
          Return:
              A list containing all channels the node participates. Optionally
              filtered by a token address and/or partner address.
  
          Raises:
              KeyError: An error occurred when the token address is unknown to the node.