Adds the field paths descended from node to field_mask.
492557
def _AddFieldPaths(node, prefix, field_mask):
  """"""
  if not node:
    field_mask.paths.append(prefix)
    return
  for name in sorted(node):
    if prefix:
      child_path = prefix + '.' + name
    else:
      child_path = name
    _AddFieldPaths(node[name], child_path, field_mask)
1327373
def bind_path_fallback(self, name, folder):
        """"""
        if not len(name) or name[0] != '/' or name[-1] != '/':
            raise ValueError(
                "name must start and end with '/': {0}".format(name))
        self._folder_masks.append((name, folder))
597104
def fill_with_defaults(process_input, input_schema):
    """"""
    for field_schema, fields, path in iterate_schema(process_input, input_schema):
        if 'default' in field_schema and field_schema['name'] not in fields:
            dict_dot(process_input, path, field_schema['default'])
265618
def addField(self, field) :
		""""""
		if field.lower() in self.legend :
			raise  ValueError("%s is already in the legend" % field.lower())
		self.legend[field.lower()] = len(self.legend)
		if len(self.strLegend) > 0 :
			self.strLegend += self.separator + field
		else :
			self.strLegend += field
645931
def _AddListFieldsMethod(message_descriptor, cls):
  """"""

  def ListFields(self):
    all_fields = [item for item in self._fields.items() if _IsPresent(item)]
    all_fields.sort(key = lambda item: item[0].number)
    return all_fields

  cls.ListFields = ListFields
263201
def _update_mask(self, mask: np.ndarray, polygons: Iterable, separate_instances: bool = False) -> None:
        
        for i, p in enumerate(polygons):
            if isinstance(p, geometry.MultiPolygon):
                self._update_mask(mask=mask, polygons=p.geoms, separate_instances=True)
                continue
            elif not isinstance(p, geometry.Polygon):
                continue
            poly_area = Image.fromarray(np.zeros(mask.shape, dtype=np.uint8))
            holes = Image.fromarray(np.zeros(mask.shape, dtype=np.uint8))
            outline_color = 0 if separate_instances else 255
            ImageDraw.Draw(poly_area).polygon(p.exterior.coords, fill=255, outline=outline_color)
            for h in p.interiors:
                ImageDraw.Draw(holes).polygon(h.coords, fill=255, outline=255)
            mask[np.nonzero(np.array(poly_area, dtype=np.uint8))] = 255
            mask[np.nonzero(np.array(holes, dtype=np.uint8))] = 0
206373
private void addCustomFields(MpxjTreeNode parentNode, ProjectFile file)
   {
      for (CustomField field : file.getCustomFields())
      {
         final CustomField c = field;
         MpxjTreeNode childNode = new MpxjTreeNode(field)
         {
            @Override public String toString()
            {
               FieldType type = c.getFieldType();
               
               return type == null ? "(unknown)" : type.getFieldTypeClass() + "." + type.toString();
            }
         };
         parentNode.add(childNode);
      }
   }
773300
def add_to_fields(self):
        ''''''
        meta = self.model._meta
        meta.scalarfields.append(self)
        if self.index:
            meta.indices.append(self)
1364179
private List<FieldNode> getFieldsByDesc(String desc, List<FieldNode> fields) {
        List<FieldNode> result = new ArrayList<FieldNode>();
        for (FieldNode fn : fields) {
            if (desc.equals(fn.desc)) {
                result.add(fn);
            }
        }
        return result;
    }
317257
def p_field_void(self, p):
        """"""
        p[0] = AstVoidField(self.path, p.lineno(1), p.lexpos(1), p[1])
        if len(p) > 3:
            if p[4] is not None:
                p[0].set_annotations(p[4])

            if p[5] is not None:
                p[0].set_doc(p[5])
166847
def AddLeafNodes(self, prefix, node):
    """"""
    if not node:
      self.AddPath(prefix)
    for name in node:
      child_path = prefix + '.' + name
      self.AddLeafNodes(child_path, node[name])
234310
def dfs_paths(path)
      paths = []
      stack = [path]
      seen  = Set.new

      while path = stack.pop
        seen.add(path.last)
        paths << path

        children = yield path.last
        children.reverse_each do |node|
          stack.push(path + [node]) unless seen.include?(node)
        end
      end

      paths
    end
1104179
private void addFilters(MpxjTreeNode parentNode, List<Filter> filters)
   {
      for (Filter field : filters)
      {
         final Filter f = field;
         MpxjTreeNode childNode = new MpxjTreeNode(field)
         {
            @Override public String toString()
            {
               return f.getName();
            }
         };
         parentNode.add(childNode);
      }
   }
995745
def append_fallback(model, fields):
    
    fields = set(fields)
    trans = set()
    from modeltranslation.translator import translator
    opts = translator.get_options_for_model(model)
    for key, _ in opts.fields.items():
        if key in fields:
            langs = resolution_order(get_language(), getattr(model, key).fallback_languages)
            fields = fields.union(build_localized_fieldname(key, lang) for lang in langs)
            fields.remove(key)
            trans.add(key)
    return fields, trans
714483
def add_paths(self, paths):
        
        if paths:
            # Use new paths in priority
            self._paths = list(paths) + self._paths
307976
protected void makeFieldDoc(VarSymbol var, TreePath treePath) {
        FieldDocImpl result = fieldMap.get(var);
        if (result != null) {
            if (treePath != null) result.setTreePath(treePath);
        } else {
            result = new FieldDocImpl(this, var, treePath);
            fieldMap.put(var, result);
        }
    }
586732
private void fillFields() {

        String folderName = getModuleFolder(m_module.getName());
        if (folderName != null) {
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_parentFormatter.getValue())) {
                m_parentFormatter.setValue(folderName + FORMATTER);
            }
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_parentSchema.getValue())) {
                m_parentSchema.setValue(folderName + SCHEMA);
            }
        }
        if (m_cms.existsResource(folderName + CmsEditModuleForm.CONFIG_FILE)) {
            m_config.setValue(folderName + CmsEditModuleForm.CONFIG_FILE);
        }
        m_parentFormatter.removeAllValidators();
        m_parentSchema.removeAllValidators();
        m_config.removeAllValidators();
        m_config.addValidator(new ResourceValidator());
        m_bundle.addValidator(new BundleValidator());
        m_parentFormatter.addValidator(new ResourceValidator());
        m_parentSchema.addValidator(new ResourceValidator());
        CmsResource bundle = getMessageBundle();
        if (bundle != null) {
            m_bundle.setValue(bundle.getRootPath());

        }
    }