parameters: (
      replication: Mapping[LocationScope, T]
  )
return_statement: return output
docstring: Sort scopes from smaller to bigger (NODE, RACK, ROW, etc.)
docstring_summary: Sort scopes from smaller to bigger (NODE, RACK, ROW, etc.)
docstring_tokens: Sort scopes from smaller to bigger ( NODE RACK ROW etc . )
function: def reverse_sort_replication(
      replication: Mapping[LocationScope, T]
  ) -> List[Tuple[LocationScope, T]]:
      """
      Sort scopes from smaller to bigger (NODE, RACK, ROW, etc.)
      """
      output = []
      for loc_scope in sorted(replication.keys(), key=lambda x: x.value):
          output.append((loc_scope, replication[loc_scope]))
      return output
function_tokens: def reverse_sort_replication ( replication : Mapping [ LocationScope , T ] ) -> List [ Tuple [ LocationScope , T ] ] : output = [ ] for loc_scope in sorted ( replication . keys ( ) , key = lambda x : x . value ) : output . append ( ( loc_scope , replication [ loc_scope ] ) ) return output