original_docstring: 
              This helper function adds the corresponding extra features based on the callback of
              the ExtraFeature element and the regex match status.
  
              It also adds, if enabled, a set of extra wires belonging to the input wire's
              node, that may require some extra features as well.
              
docstring: This helper function adds the corresponding extra features based on the callback of
  the ExtraFeature element and the regex match status.
  
  It also adds, if enabled, a set of extra wires belonging to the input wire's
  node, that may require some extra features as well.
docstring_tokens: This helper function adds the corresponding extra features based on the callback of the ExtraFeature element and the regex match status . It also adds if enabled a set of extra wires belonging to the input wire ' s node that may require some extra features as well .
code: def run_regex_match(extra_feature,
                              tile,
                              wire,
                              extra_wires,
                              enable_extra_wires=True):
              """
              This helper function adds the corresponding extra features based on the callback of
              the ExtraFeature element and the regex match status.
  
              It also adds, if enabled, a set of extra wires belonging to the input wire's
              node, that may require some extra features as well.
              """
  
              extra_wires_to_check = ["CLK_BUFG_REBUF_R_CK", "HCLK_CK_BUFHCLK"]
  
              if any(
                      wire.startswith(extra_wire) for extra_wire in
                      extra_wires_to_check) and enable_extra_wires:
                  node_index = self.device_resources.node(tile, wire).node_index
                  wires = self.device_resources.device_resource_capnp.nodes[
                      node_index].wires
                  for wire_idx in wires:
                      tile_wire = self.device_resources.device_resource_capnp.wires[
                          wire_idx]
                      wire_name = self.device_resources.strs[tile_wire.wire]
                      tile_name = self.device_resources.strs[tile_wire.tile]
  
                      extra_wires.add((tile_name, wire_name))
  
              regex = re.compile(extra_feature.regex)
              m = regex.match(wire)
  
              if m:
                  prefix = extra_feature.callback(m)
  
                  for f in extra_feature.features:
                      f = "{}{}".format(prefix, f)
                      self.add_cell_feature((tile, f))
code_tokens: def run_regex_match ( extra_feature , tile , wire , extra_wires , enable_extra_wires = True ) : extra_wires_to_check = [ "CLK_BUFG_REBUF_R_CK" , "HCLK_CK_BUFHCLK" ] if any ( wire . startswith ( extra_wire ) for extra_wire in extra_wires_to_check ) and enable_extra_wires : node_index = self . device_resources . node ( tile , wire ) . node_index wires = self . device_resources . device_resource_capnp . nodes [ node_index ] . wires for wire_idx in wires : tile_wire = self . device_resources . device_resource_capnp . wires [ wire_idx ] wire_name = self . device_resources . strs [ tile_wire . wire ] tile_name = self . device_resources . strs [ tile_wire . tile ] extra_wires . add ( ( tile_name , wire_name ) ) regex = re . compile ( extra_feature . regex ) m = regex . match ( wire ) if m : prefix = extra_feature . callback ( m ) for f in extra_feature . features : f = "{}{}" . format ( prefix , f ) self . add_cell_feature ( ( tile , f ) )
short_docstring: This helper function adds the corresponding extra features based on the callback of
  the ExtraFeature element and the regex match status.
short_docstring_tokens: This helper function adds the corresponding extra features based on the callback of the ExtraFeature element and the regex match status .
comment: """
              This helper function adds the corresponding extra features based on the callback of
              the ExtraFeature element and the regex match status.
  
              It also adds, if enabled, a set of extra wires belonging to the input wire's
              node, that may require some extra features as well.
              """