parameters: (mat_lib, **kwargs)
return_statement: return mat_xs_names
docstring: Replace nucids with xs library names.
docstring_summary: Replace nucids with xs library names.
docstring_tokens: Replace nucids with xs library names .
function: def _nucid_to_xs(mat_lib, **kwargs):
      """Replace nucids with xs library names.
      """
      if 'nuc_names' in kwargs:
          nuc_names = kwargs['nuc_names']
          names_tf = True
      else:
          names_tf = False
  
      mat_xs_names = {}
      for mat in mat_lib:
          mat_xs_names[mat] = {}
          for nucid in mat_lib[mat]:
              if names_tf:
                  if nucid in nuc_names:
                      name = nuc_names[nucid]
                      mat_xs_names[mat][name] = mat_lib[mat][nucid]
                  else:
                      warn(
                          "Nucid {0} does not exist in the provided nuc_names dictionary.".format(nucid))
                      mat_xs_names[mat]["{0}".format(
                          nucid)] = mat_lib[mat][nucid]
              else:
                  mat_xs_names[mat][nucname.name(nucid)] = mat_lib[mat][nucid]
  
      return mat_xs_names
function_tokens: def _nucid_to_xs ( mat_lib , * * kwargs ) : if 'nuc_names' in kwargs : nuc_names = kwargs [ 'nuc_names' ] names_tf = True else : names_tf = False mat_xs_names = { } for mat in mat_lib : mat_xs_names [ mat ] = { } for nucid in mat_lib [ mat ] : if names_tf : if nucid in nuc_names : name = nuc_names [ nucid ] mat_xs_names [ mat ] [ name ] = mat_lib [ mat ] [ nucid ] else : warn ( "Nucid {0} does not exist in the provided nuc_names dictionary." . format ( nucid ) ) mat_xs_names [ mat ] [ "{0}" . format ( nucid ) ] = mat_lib [ mat ] [ nucid ] else : mat_xs_names [ mat ] [ nucname . name ( nucid ) ] = mat_lib [ mat ] [ nucid ] return mat_xs_names