parameters: ( build_descs_by_axis )
return_statement: return build_descs
docstring: Returns a list of BuildDesc generated for the partial BuildDesc for each axis.
docstring_summary: Returns a list of BuildDesc generated for the partial BuildDesc for each axis.
docstring_tokens: Returns a list of BuildDesc generated for the partial BuildDesc for each axis .
function: def generate_build_variants( build_descs_by_axis ):
      """Returns a list of BuildDesc generated for the partial BuildDesc for each axis."""
      axis_names = build_descs_by_axis.keys()
      build_descs = []
      for axis_name, axis_build_descs in build_descs_by_axis.items():
          if len(build_descs):
              # for each existing build_desc and each axis build desc, create a new build_desc
              new_build_descs = []
              for prototype_build_desc, axis_build_desc in itertools.product( build_descs, axis_build_descs):
                  new_build_descs.append( prototype_build_desc.merged_with( axis_build_desc ) )
              build_descs = new_build_descs
          else:
              build_descs = axis_build_descs
      return build_descs
function_tokens: def generate_build_variants ( build_descs_by_axis ) : axis_names = build_descs_by_axis . keys ( ) build_descs = [ ] for axis_name , axis_build_descs in build_descs_by_axis . items ( ) : if len ( build_descs ) : # for each existing build_desc and each axis build desc, create a new build_desc new_build_descs = [ ] for prototype_build_desc , axis_build_desc in itertools . product ( build_descs , axis_build_descs ) : new_build_descs . append ( prototype_build_desc . merged_with ( axis_build_desc ) ) build_descs = new_build_descs else : build_descs = axis_build_descs return build_descs