code: def _get_initial_args(
      objective_function,
      initial_population,
      initial_position,
      population_size,
      population_stddev,
      max_iterations,
      func_tolerance,
      position_tolerance,
      differential_weight,
      crossover_prob,
      seed,
  ):
      """Processes initial args."""
      was_iterable = False
      if initial_position is not None:
          initial_position, was_iterable = _ensure_list(
              initial_position
          )
  
      if initial_population is not None:
          initial_population, was_iterable = _ensure_list(
              initial_population
          )
  
      population = _get_starting_population(
          initial_population,
          initial_position,
          population_size,
          population_stddev,
          seed=seed,
      )
  
      differential_weight = tf.convert_to_tensor(
          differential_weight, dtype=population[0].dtype.base_dtype
      )
  
      crossover_prob = tf.convert_to_tensor(crossover_prob)
      population_values = objective_function(*population)
      if max_iterations is not None:
          max_iterations = tf.convert_to_tensor(max_iterations)
      func_tolerance = tf.convert_to_tensor(
          func_tolerance, dtype=population_values.dtype.base_dtype
      )
      position_tolerance = tf.convert_to_tensor(
          position_tolerance, dtype=population[0].dtype.base_dtype
      )
      return (
          was_iterable,
          population,
          population_values,
          max_iterations,
          func_tolerance,
          position_tolerance,
          differential_weight,
          crossover_prob,
      )
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.util import seed_stream
label_desc: Use image node_id 3 for calling a global function with example usage: _get_initial_args(objective_function, initial_population, initial_position, population_size, population_stddev, max_iterations, func_tolerance, position_tolerance, differential_weight, crossover_prob, seed) and returns: was_iterable,  population,  population_values,  max_iterations,  func_tolerance,  position_tolerance,  differential_weight,  crossover_prob