docstr: Args:
      node_type: str, if None, then random select one type from node_type_list
  
      size: int
docstr_tok: ["Args",":","node_type",":","str",",","if","None",",","then","random","select","one","type","from","node_type_list","size",":","int"]
code: def random_sample_nodes(self, node_type=None, size=1):
      """
      Args:
          node_type: str, if None, then random select one type from node_type_list
  
          size: int
      """
      if node_type is None:
          node_type = np.random.choice(self.node_type_list)
      sampled_nodes = []
      server_list = list(range(self.server_num))
      np.random.shuffle(server_list)
      left_size = size
      for server_idx in server_list:
          nodes = self._client.random_sample_nodes(
              node_type, server_idx, left_size
          )
          sampled_nodes.extend(nodes)
          if len(sampled_nodes) >= size:
              break
          else:
              left_size = size - len(sampled_nodes)
  
      return sampled_nodes
  
imports: import os
  import sys
  import time
  import argparse
  import warnings
  import numpy
  from functools import partial
  from paddle.framework import core
  from pgl.utils.logger import log
  from pgl.distributed import helper
label_desc: Use image node_id 6 for calling the DistGraphClient obj's underlying member method code with example usage: obj.random_sample_nodes(node_type, size) and returns: sampled_nodes