original_docstring: 
          Private method to obtain the mapping to create
          a disordered structure from a given partition.
          
docstring: Private method to obtain the mapping to create
  a disordered structure from a given partition.
docstring_tokens: Private method to obtain the mapping to create a disordered structure from a given partition .
code: def _get_disorder_mappings(composition, partitions):
          """
          Private method to obtain the mapping to create
          a disordered structure from a given partition.
          """
  
          def _get_replacement_dict_from_partition(partition):
              d = {}  # to be passed to Structure.replace_species()
              for sp_list in partition:
                  if len(sp_list) > 1:
                      total_occ = sum([composition[sp] for sp in sp_list])
                      merged_comp = {sp: composition[sp] / total_occ for sp in sp_list}
                      for sp in sp_list:
                          d[sp] = merged_comp
              return d
  
          disorder_mapping = [_get_replacement_dict_from_partition(p)
                              for p in partitions]
  
          return disorder_mapping
code_tokens: def _get_disorder_mappings ( composition , partitions ) : def _get_replacement_dict_from_partition ( partition ) : d = { } for sp_list in partition : if len ( sp_list ) > 1 : total_occ = sum ( [ composition [ sp ] for sp in sp_list ] ) merged_comp = { sp : composition [ sp ] / total_occ for sp in sp_list } for sp in sp_list : d [ sp ] = merged_comp return d disorder_mapping = [ _get_replacement_dict_from_partition ( p ) for p in partitions ] return disorder_mapping
short_docstring: Private method to obtain the mapping to create
  a disordered structure from a given partition.
short_docstring_tokens: Private method to obtain the mapping to create a disordered structure from a given partition .
comment: """
          Private method to obtain the mapping to create
          a disordered structure from a given partition.
          """$SEP$# to be passed to Structure.replace_species()