nodes: 0, module; 1, function_definition; 2, function_name:get_dummy_dynamic_run; 3, parameters; 4, block; 5, identifier:nsamples; 6, dictionary_splat_pattern; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, if_statement; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, comment:# Seed must be False here so it is not set again for each thread; 18, expression_statement; 19, comment:# make sure the threads have unique labels and combine them; 20, for_statement; 21, expression_statement; 22, comment:# To make sure the thread labelling is same way it would when; 23, comment:# processing a dead points file, tranform into dead points; 24, expression_statement; 25, return_statement; 26, identifier:kwargs; 27, comment:"""Generate dummy data for a dynamic nested sampling run.
  
      Loglikelihood values of points are generated from a uniform distribution
      in (0, 1), sorted, scaled by logl_range and shifted by logl_start (if it is
      not -np.inf). Theta values of each point are each generated from a uniform
      distribution in (0, 1).
  
      Parameters
      ----------
      nsamples: int
          Number of samples in thread.
      nthread_init: int
          Number of threads in the inital run (starting at logl=-np.inf).
      nthread_dyn: int
          Number of threads in the inital run (starting at randomly chosen points
          in the initial run).
      ndim: int, optional
          Number of dimensions.
      seed: int, optional
          If not False, the seed is set with np.random.seed(seed).
      logl_start: float, optional
          logl at which thread starts.
      logl_range: float, optional
          Scale factor applied to logl values.
      """; 28, assignment; 29, assignment; 30, assignment; 31, assignment; 32, assignment; 33, identifier:kwargs; 34, block; 35, assignment; 36, assignment; 37, assignment; 38, augmented_assignment; 39, pattern_list; 40, call; 41, block; 42, assignment; 43, assignment; 44, call; 45, identifier:seed; 46, call; 47, identifier:ndim; 48, call; 49, identifier:nthread_init; 50, call; 51, identifier:nthread_dyn; 52, call; 53, identifier:logl_range; 54, call; 55, raise_statement; 56, identifier:init; 57, call; 58, identifier:dyn_starts; 59, call; 60, identifier:threads; 61, call; 62, identifier:threads; 63, list_comprehension; 64, identifier:i; 65, identifier:_; 66, identifier:enumerate; 67, argument_list; 68, expression_statement; 69, identifier:run; 70, call; 71, identifier:samples; 72, call; 73, attribute; 74, argument_list; 75, attribute; 76, argument_list; 77, attribute; 78, argument_list; 79, attribute; 80, argument_list; 81, attribute; 82, argument_list; 83, attribute; 84, argument_list; 85, call; 86, identifier:get_dummy_run; 87, argument_list; 88, identifier:list; 89, argument_list; 90, attribute; 91, argument_list; 92, call; 93, for_in_clause; 94, identifier:threads; 95, assignment; 96, attribute; 97, argument_list; 98, attribute; 99, argument_list; 100, attribute; 101, identifier:process_samples_array; 102, identifier:samples; 103, identifier:kwargs; 104, identifier:pop; 105, string; 106, False; 107, identifier:kwargs; 108, identifier:pop; 109, string; 110, integer:2; 111, identifier:kwargs; 112, identifier:pop; 113, string; 114, integer:2; 115, identifier:kwargs; 116, identifier:pop; 117, string; 118, integer:3; 119, identifier:kwargs; 120, identifier:pop; 121, string; 122, integer:1; 123, identifier:TypeError; 124, argument_list; 125, identifier:nthread_init; 126, identifier:nsamples; 127, keyword_argument; 128, keyword_argument; 129, keyword_argument; 130, keyword_argument; 131, call; 132, attribute; 133, identifier:get_run_threads; 134, identifier:init; 135, identifier:get_dummy_thread; 136, argument_list; 137, identifier:start; 138, identifier:dyn_starts; 139, subscript; 140, call; 141, attribute; 142, identifier:combine_threads; 143, identifier:threads; 144, attribute; 145, identifier:run_dead_birth_array; 146, identifier:run; 147, identifier:nestcheck; 148, identifier:data_processing; 149, string_content:seed; 150, string_content:ndim; 151, string_content:nthread_init; 152, string_content:nthread_dyn; 153, string_content:logl_range; 154, call; 155, identifier:ndim; 156, identifier:ndim; 157, identifier:seed; 158, identifier:seed; 159, identifier:logl_start; 160, unary_operator; 161, identifier:logl_range; 162, identifier:logl_range; 163, attribute; 164, argument_list; 165, identifier:nestcheck; 166, identifier:ns_run_utils; 167, identifier:nsamples; 168, keyword_argument; 169, keyword_argument; 170, keyword_argument; 171, keyword_argument; 172, subscript; 173, string; 174, attribute; 175, argument_list; 176, identifier:nestcheck; 177, identifier:ns_run_utils; 178, identifier:nestcheck; 179, identifier:write_polychord_output; 180, attribute; 181, argument_list; 182, attribute; 183, attribute; 184, identifier:choice; 185, subscript; 186, identifier:nthread_dyn; 187, keyword_argument; 188, identifier:ndim; 189, identifier:ndim; 190, identifier:seed; 191, False; 192, identifier:logl_start; 193, identifier:start; 194, identifier:logl_range; 195, identifier:logl_range; 196, identifier:threads; 197, identifier:i; 198, string_content:thread_labels; 199, identifier:np; 200, identifier:full; 201, identifier:nsamples; 202, identifier:i; 203, string; 204, identifier:format; 205, identifier:kwargs; 206, identifier:np; 207, identifier:inf; 208, identifier:np; 209, identifier:random; 210, identifier:init; 211, string; 212, identifier:replace; 213, True; 214, string_content:Unexpected **kwargs: {0}; 215, string_content:logl
code: def get_dummy_dynamic_run(nsamples, **kwargs):
      """Generate dummy data for a dynamic nested sampling run.
  
      Loglikelihood values of points are generated from a uniform distribution
      in (0, 1), sorted, scaled by logl_range and shifted by logl_start (if it is
      not -np.inf). Theta values of each point are each generated from a uniform
      distribution in (0, 1).
  
      Parameters
      ----------
      nsamples: int
          Number of samples in thread.
      nthread_init: int
          Number of threads in the inital run (starting at logl=-np.inf).
      nthread_dyn: int
          Number of threads in the inital run (starting at randomly chosen points
          in the initial run).
      ndim: int, optional
          Number of dimensions.
      seed: int, optional
          If not False, the seed is set with np.random.seed(seed).
      logl_start: float, optional
          logl at which thread starts.
      logl_range: float, optional
          Scale factor applied to logl values.
      """
      seed = kwargs.pop('seed', False)
      ndim = kwargs.pop('ndim', 2)
      nthread_init = kwargs.pop('nthread_init', 2)
      nthread_dyn = kwargs.pop('nthread_dyn', 3)
      logl_range = kwargs.pop('logl_range', 1)
      if kwargs:
          raise TypeError('Unexpected **kwargs: {0}'.format(kwargs))
      init = get_dummy_run(nthread_init, nsamples, ndim=ndim, seed=seed,
                           logl_start=-np.inf, logl_range=logl_range)
      dyn_starts = list(np.random.choice(
          init['logl'], nthread_dyn, replace=True))
      threads = nestcheck.ns_run_utils.get_run_threads(init)
      # Seed must be False here so it is not set again for each thread
      threads += [get_dummy_thread(
          nsamples, ndim=ndim, seed=False, logl_start=start,
          logl_range=logl_range) for start in dyn_starts]
      # make sure the threads have unique labels and combine them
      for i, _ in enumerate(threads):
          threads[i]['thread_labels'] = np.full(nsamples, i)
      run = nestcheck.ns_run_utils.combine_threads(threads)
      # To make sure the thread labelling is same way it would when
      # processing a dead points file, tranform into dead points
      samples = nestcheck.write_polychord_output.run_dead_birth_array(run)
      return nestcheck.data_processing.process_samples_array(samples)