produce a new explanation with a provided parent answer

@param ans parent answer
@return new explanation with dependent answers
551543
@CheckReturnValue
    public Explanation childOf(ConceptMap ans) {
        return new Explanation(getPattern(), ans.explanation().getAnswers());
    }
503296
def generate_answers
      the_answers = {}
      dashboard = only_host_with_role(@hosts, 'dashboard')
      master = only_host_with_role(@hosts, 'master')
      @hosts.each do |h|
        the_answers[h.name] = host_answers(h, master, dashboard, @options)
        if the_answers[h.name] && h[:custom_answers]
          the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
        end
        h[:answers] = the_answers[h.name]
      end
      return the_answers
    end
581483
function(template, parent) {
    var templateLocation;
    if (templateNameToRepo[template].startsWith('file://')) {
      templateLocation = templateNameToRepo[template].slice(7);
    } else {
      templateLocation = path.join(path.homedir(), '.khaos', 'templates', template);
    }
    return function(callback, results) {
      var processTemplate = function(location, cb) {
        var khaos = new Khaos(path.join(templateLocation, 'template'));
        khaos.read(function(err, files) {
          if (err) return cb(err);
          khaos.parse(files, function(err2, schema) {
            if (err2) return cb(err2);

            // only prompt for new variables
            var newVars = _.omit(schema, _.keys(results[parent] || args.answers));
            khaos.prompt(newVars, function(err3, answers) {
              if (err3) return cb(err3);

              // merge new answers with existing ones and pass to next template
              answers = _.merge(answers, results[parent] || args.answers || {});
              khaos.write(results.destination, files, answers, function(err4) {
                cb(err4, answers);
              });
            });
          });
        });
      };

      // download from github if not yet locally cached
      if (!exists(templateLocation)) {
        download(templateNameToRepo[template], templateLocation, function(err) {
          if (err) return callback(err);
          processTemplate(templateLocation, callback);
        });
      } else {
        processTemplate(templateLocation, callback);
      }
    };
  }
1182177
public Map<String, Object> createContext(final Map<String, Object> parent, Map<String, Object> current) {
        return new DelegateMap<String, Object>(parent, current) {
            private static final long serialVersionUID = 1L;

            @Override
            public Object get(Object key) {
                Object value = super.get(key);
                if (value == null && parent == null
                        && resolver != null) {
                    return resolver.get((String) key);
                }
                return value;
            }
        };
    }
1171556
def recreate_parent_dependencies(apps, schema_editor):
    """"""
    Data = apps.get_model('flow', 'Data')
    DataDependency = apps.get_model('flow', 'DataDependency')

    def process_dependency(data, parent):
        if not Data.objects.filter(pk=parent).exists():
            DataDependency.objects.create(
                child=data, parent=None, kind='io'
            )

    for data in Data.objects.all():
        for field_schema, fields in iterate_fields(data.input, data.process.input_schema):
            name = field_schema['name']
            value = fields[name]

            if field_schema.get('type', '').startswith('data:'):
                process_dependency(data, value)

            elif field_schema.get('type', '').startswith('list:data:'):
                for parent in value:
                    process_dependency(data, parent)
1285747
public SharedTreeNode makeLeftChildNode(SharedTreeNode parent) {
    SharedTreeNode child = new SharedTreeNode(nodesArray.size(), parent, subgraphNumber, parent.getDepth() + 1);
    nodesArray.add(child);
    makeLeftEdge(parent, child);
    return child;
  }
984832
private function explainOneOf($data, $explanation, $currentPath, $isArray = false)
    {
        $explanation->addOneOf(array_map(function ($oneOf) use ($currentPath, $isArray) {
            return $this->explainSchema($oneOf, null, $currentPath, $isArray);
        }, $data->oneOf), 'an auto generated descr', true);
    }
564219
protected String getAnswers(Integer questionSeqId, List<? extends AnswerHeaderContract> answerHeaders) {

        String answer = null;
        String childAnswer = null;
        StringBuilder stringBuilder = new StringBuilder();
        if (answerHeaders != null && !answerHeaders.isEmpty()) {
            for (AnswerHeaderContract answerHeader : answerHeaders) {
                List<? extends AnswerContract> answerDetails = answerHeader.getAnswers();
                for (AnswerContract answers : answerDetails) {
                    if (questionSeqId.equals(getQuestionAnswerService().findQuestionById(answers.getQuestionId()).getQuestionSeqId())) {
                        answer = answers.getAnswer();
                        if (answer != null) {
                            if (!answer.equals(NOT_ANSWERED)) {
                                stringBuilder.append(answer);
                                stringBuilder.append(",");
                            }
                        }
                        childAnswer = stringBuilder.toString();
                    }
                }
            }
        }
        return childAnswer;
    }
1092887
public ClassNode parent(String name) {
        this.parent = infoBase.node(name);
        this.parent.addChild(this);
        for (ClassNode intf : parent.interfaces.values()) {
            addInterface(intf);
        }
        return this;
    }
336794
public static JDialog newJDialog(Component parentComponent, @NonNull JOptionPane pane,
		String title)
	{
		return parentComponent == null
			? pane.createDialog(parentComponent, title)
			: pane.createDialog(title);
	}
872322
protected Node doClone(Node parent) {
        Node clone;

        try {
            clone = (Node) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }

        clone.parentNode = parent; // can be null, to create an orphan split
        clone.siblingIndex = parent == null ? 0 : siblingIndex;

        return clone;
    }
165700
def addAnswers(self, answers, callback=None, errback=None, **kwargs):
        
        if not self.data:
            raise RecordException('record not loaded')
        orig_answers = self.data['answers']
        new_answers = self._rest._getAnswersForBody(answers)
        orig_answers.extend(new_answers)
        return self.update(answers=orig_answers, callback=callback,
                           errback=errback, **kwargs)
812507
public void setParents(java.util.Collection<Parent> parents) {
        if (parents == null) {
            this.parents = null;
            return;
        }

        this.parents = new java.util.ArrayList<Parent>(parents);
    }
378378
public static function createFromRaw($rawResponse, Response $parentResponse = null)
    {
        /** @var Response $response */
        $response = ResponseInformationHelper::createFromRaw($rawResponse, self::class);
        $response->parentResponse = $parentResponse;

        return $response;
    }
971838
def extend_parents(parents):
    
    new_parents = set()

    for parent in parents:

        new_parents.add(parent)

        if isinstance(parent, DeterministicBase):
            new_parents.remove(parent)
            new_parents |= parent.extended_parents

        elif isinstance(parent, ContainerBase):
            for contained_parent in parent.stochastics:
                new_parents.add(contained_parent)
            for contained_parent in parent.deterministics:
                new_parents |= contained_parent.extended_parents

    return new_parents
224095
protected function buildDependencyInjectedAnswer($answerClass)
    {
        // check if the command has a constructor
        if (!method_exists($answerClass, '__construct')) {
            return new $answerClass();
        }

        // get constructor params
        $constructorReflector = new \ReflectionMethod($answerClass, '__construct');
        $params = $constructorReflector->getParameters();

        // if no params are needed proceed with normal instantiation
        if (empty($params)) {
            return new $answerClass();
        }

        // otherwise fetch each dependency out of the container
        $container = $this->telegram->getContainer();
        $dependencies = [];
        foreach ($params as $param) {
            $dependencies[] = $container->make($param->getClass()->name);
        }

        // and instantiate the object with dependencies through ReflectionClass
        $classReflector = new \ReflectionClass($answerClass);

        return $classReflector->newInstanceArgs($dependencies);
    }
889625
@Incubating
    public static <T> Answer<T> answersWithDelay(long sleepyTime, Answer<T> answer) {
        return (Answer<T>) new AnswersWithDelay(sleepyTime, (Answer<Object>) answer);
    }