.. todo::

            Document this.
435873
def set_helper(self, helper):
        
        # We don't want to "unset" in this method.
        if helper is None:
            return

        # Get the right kind of helper if given a DockerHelper
        if isinstance(helper, DockerHelper):
            helper = helper._helper_for_model(self.__model_type__)

        # We already have this one.
        if helper is self._helper:
            return
        if self._helper is None:
            self._helper = helper
        else:
            raise RuntimeError('Cannot replace existing helper.')
1138297
public void doFormatJsDoc(FormattingContext ctx) {
    if (this.isSingleLine()) {
      ctx.append(this.toString());
      return;
    }
    ctx.append("/**");
    ctx.endLine();
    for (Param param : params()) {
      ctx.append(" * ");
      param.format(ctx);
      ctx.endLine();
    }
    ctx.append(" */");
  }
864678
def render(document)
      document['content'].each_with_object([]) do |node, result|
        result << find_renderer(node).render(node)
      end.join("\n")
    end
436801
public static Document toDocument(InputStream is) throws MarshalException {
		try {
			return newDocumentBuilder().parse(is);
		} catch (SAXException e) {
			IfmapJLog.error(e.getMessage());
			throw new MarshalException(e.getMessage());
		} catch (IOException e) {
			IfmapJLog.error(e.getMessage());
			throw new MarshalException(e.getMessage());
		}
	}
425935
def copy_document(destination, identifier, pointer):
    """"""
    record = Record.get_record(identifier)
    click.echo(json.dumps(
        Document(record, pointer).copy(destination)
    ))
865499
def documentation(self):
        """"""

        # Return the documentation as a scalar term, which has .text() and .html methods to do
        # metadata substitution using Jinja

        s = ''

        rc = self.build_source_files.documentation.record_content

        if rc:
            s += rc

        for k, v in  self.metadata.documentation.items():
            if  v:
                s += '\n### {}\n{}'.format(k.title(), v)

        return self.metadata.scalar_term(s)
1011202
def show(self):
        """"""
        for entry in self._entries:
            print "{'%s': %s, 'records': %s}" % (
                entry._record_type, entry.host, entry.records)
        print
420888
function Documentation() {
  return {
    composes: [],
    descriptors: {},
    getPropDescriptor(name) {
      return this.descriptors[name] || (this.descriptors[name] = {});
    },
    addComposes(name) {
      this.composes.push(name);
    },
    set(key, value) {
      this[key] = value;
    },
  };
}
1176934
def d(memo, other)
      other.each do |sort|
        unless memo.keys.include?(sort[0])
          memo << sort
        end
      end
    end
943891
def insert_doc(self, p_elem, docstring):
        """"""
        dtag = self.namespaces[self.a_uri] + ":documentation"
        elem = SchemaNode(dtag, text=docstring)
        p_elem.annots.append(elem)
351568
function build_doc_map(docs) {
  var map = {};
  _.each(docs, function(tag) {
    if (map[tag["tagname"]])
      map[tag["tagname"]].push(tag);
    else
      map[tag["tagname"]] = new Array(tag);
  });
  return map;
}
988127
def documentation(header_info, selection, applicable_devices, link)
      _documentation
      # Create a new documenation and place it in the 5-D hash
      @_documentation[header_info[:section]][header_info[:subsection]][selection[:interface]][selection[:type]][selection[:sub_type]][selection[:mode]][selection[:audience]] = Documentation.new(header_info, selection, applicable_devices, link)
    end
720990
def server_doc(self_or_cls, obj, doc=None):
        
        if not isinstance(obj, (Plot, BokehServerWidgets)):
            if not isinstance(self_or_cls, BokehRenderer) or self_or_cls.mode != 'server':
                renderer = self_or_cls.instance(mode='server')
            else:
                renderer = self_or_cls
            plot, _ =  renderer._validate(obj, 'auto')
        else:
            plot = obj

        root = plot.state
        if isinstance(plot, BokehServerWidgets):
            plot = plot.plot

        if doc is None:
            doc = plot.document
        else:
            plot.document = doc

        plot.traverse(lambda x: attach_periodic(x), [GenericElementPlot])
        doc.add_root(root)
        return doc
463786
function() {
				var doc = this;
				var newDoc = {};
				_.forEach(this, function(v, k) {
					if (doc.hasOwnProperty(k) && !_.startsWith(k, '$')) newDoc[k] = _.clone(v);
				});

				return newDoc;
			}
291507
function (element) {
      var docDomEl = $document[0];
      var offsetParent = element.offsetParent || docDomEl;
      while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent) ) {
        offsetParent = offsetParent.offsetParent;
      }
      return offsetParent || docDomEl;
    }
1118092
function( documents ) {
    
    documents = this.map( documents )
    
    for( var key in documents ) {
      this.documents[ key ] = documents[ key ]
    }
    
  }
1013554
def model_to_document(model)
      document = model.attributes.dup.except(:key, :rev)

      handle_embedded_models(model, document)
      handle_related_models(document)

      document
    end