code: def transform(list, pattern, indices=[1]):
      """Matches all elements of 'list' agains the 'pattern'
      and returns a list of the elements indicated by indices of
      all successfull matches. If 'indices' is omitted returns
      a list of first paranthethised groups of all successfull
      matches.
      """
      result = []
  
      for e in list:
          m = re.match(pattern, e)
  
          if m:
              for i in indices:
                  result.append(m.group(i))
  
      return result
  
imports: import re
  from b2.util import bjam_signature
label_desc: Use image node_id 1 for calling a global function with example usage: transform(list, pattern, indices) and returns: result