'Grow the program body.'

def grow_body(self, new_var_name, dependencies, types_to_vars):

    choices = []
    for f in self.functions:
        if all([(a in types_to_vars.keys()) for a in f.arg_types]):
            choices.append(f)
    f = random.choice(choices)
    args = []
    for t in f.arg_types:
        possible_vars = random.choice(types_to_vars[t])
        var = random.choice(possible_vars)
        args.append(var)
        dependencies.setdefault(new_var_name, []).extend(([var] + dependencies[var]))
    fn_args = [random.choice(self.types_to_lambdas[t]) for t in f.fn_arg_types]
    types_to_vars.setdefault(f.output_type, []).append(new_var_name)
    return Statement(f, new_var_name, args, fn_args)
