// NewTraitMethodRef node constructor
324551
func NewTraitMethodRef(Trait node.Node, Method node.Node) *TraitMethodRef {
	return &TraitMethodRef{
		FreeFloating: nil,
		Trait:        Trait,
		Method:       Method,
	}
}
359859
func (exp *GetAttrExpr) All() []Node {
	res := []Node{exp.Cont, exp.Attr}
	for _, v := range exp.Args {
		res = append(res, v)
	}
	return res
}
719493
func (i Ref) CanonicalRef() CanonicalRef {
	name := i.CanonicalName()
	return CanonicalRef{
		Ref: Ref{
			Name: name.Name,
			Tag:  i.Tag,
		},
	}
}
437737
func NewTranslateStore(node interface{}) pilosa.TranslateStore {
	var n *pilosa.Node
	switch v := node.(type) {
	case string:
		if uri, err := pilosa.NewURIFromAddress(v); err != nil {
			panic("bad uri for translatestore in deprecated api")
		} else {
			n = &pilosa.Node{
				ID:  v,
				URI: *uri,
			}
		}
	case *pilosa.Node:
		n = v
	default:
		panic("*pilosa.Node is the only type supported by NewTranslateStore().")
	}
	return &translateStore{node: n}
}
1246782
func NewText(txt string) *Element {
	em := NewElement("text", false)
	em.allowChildren = false
	em.allowAttributes = false
	em.allowStyles = false
	em.allowEvents = false
	em.textContent = txt
	return em
}
326636
func NewTreeVertex(id string, data interface{}, descendants ...*TreeVertex) *TreeVertex {
	return &TreeVertex{
		Id:          id,
		Data:        data,
		Descendants: descendants,
	}
}
489965
func newTranslateFileReader(ctx context.Context, store *TranslateFile, offset int64) *translateFileReader {
	return &translateFileReader{
		ctx:     ctx,
		store:   store,
		offset:  offset,
		notify:  store.WriteNotify(),
		closing: make(chan struct{}),
	}
}
1341098
func (c *RefManager) GetRef(id ContainerID) (ref *v1.ObjectReference, ok bool) {
	c.RLock()
	defer c.RUnlock()
	ref, ok = c.containerIDToRef[id]
	return ref, ok
}
613844
func NewTermFacet(field string, size int) *TermFacet {
	mq := &TermFacet{}
	mq.data.Field = field
	mq.data.Size = size
	return mq
}
1262871
func NewThriftHandlerFunc(processor TProcessor,
	inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request) {

	return gz(func(w http.ResponseWriter, r *http.Request) {
		w.Header().Add("Content-Type", "application/x-thrift")

		transport := NewStreamTransport(r.Body, w)
		processor.Process(r.Context(), inPfactory.GetProtocol(transport), outPfactory.GetProtocol(transport))
	})
}
760873
func NewTree(name string, c *config.Config) *Tree {
	return &Tree{config: c, name: name}
}
943430
func NewTriNode(operator lex.Token, arg1, arg2, arg3 Node) *TriNode {
	return &TriNode{Args: []Node{arg1, arg2, arg3}, Operator: operator}
}
627821
func (up *Uploader) NewTreeUpload(dir string) *TreeUpload {
	tu := up.NewRootlessTreeUpload()
	tu.rootless = false
	tu.base = dir
	return tu
}
658801
func newThirdPartyResources(c *ExtensionsClient, namespace string) *thirdPartyResources {
	return &thirdPartyResources{
		client: c,
		ns:     namespace,
	}
}
935252
func NewTernaryIfExpr(cond, tx, fx Expr, pos Pos) *TernaryIfExpr {
	return &TernaryIfExpr{pos, cond, tx, fx}
}
1310327
func NewTrustMetricStore(db dbm.DB, tmc TrustMetricConfig) *TrustMetricStore {
	tms := &TrustMetricStore{
		peerMetrics: make(map[string]*TrustMetric),
		db:          db,
		config:      tmc,
	}

	tms.BaseService = *cmn.NewBaseService(nil, "TrustMetricStore", tms)
	return tms
}
343567
func NewTry(Stmts []node.Node, Catches []node.Node, Finally node.Node) *Try {
	return &Try{
		FreeFloating: nil,
		Stmts:        Stmts,
		Catches:      Catches,
		Finally:      Finally,
	}
}