nodes: 0, module; 1, function_definition; 2, function_name:_get_alphabetical_members; 3, parameters; 4, block; 5, identifier:obj; 6, identifier:predicate; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Get members of an object, sorted alphabetically.
  
      Parameters
      ----------
      obj
          An object.
      predicate : callable
          Callable that takes an attribute and returns a bool of whether the
          attribute should be returned or not.
  
      Returns
      -------
      members : `dict`
          Dictionary of
  
          - Keys: attribute name
          - Values: attribute
  
          The dictionary is ordered according to the attribute name.
  
      Notes
      -----
      This uses the insertion-order-preserved nature of `dict` in Python 3.6+.
  
      See also
      --------
      `inspect.getmembers`
      """; 13, assignment; 14, assignment; 15, call; 16, dictionary_comprehension; 17, identifier:fields; 18, call; 19, identifier:keys; 20, call; 21, attribute; 22, argument_list; 23, pair; 24, for_in_clause; 25, identifier:dict; 26, argument_list; 27, identifier:list; 28, argument_list; 29, identifier:keys; 30, identifier:sort; 31, identifier:k; 32, subscript; 33, identifier:k; 34, identifier:keys; 35, call; 36, call; 37, identifier:fields; 38, identifier:k; 39, attribute; 40, argument_list; 41, attribute; 42, argument_list; 43, identifier:inspect; 44, identifier:getmembers; 45, identifier:obj; 46, identifier:predicate; 47, identifier:fields; 48, identifier:keys
code: def _get_alphabetical_members(obj, predicate):
      """Get members of an object, sorted alphabetically.
  
      Parameters
      ----------
      obj
          An object.
      predicate : callable
          Callable that takes an attribute and returns a bool of whether the
          attribute should be returned or not.
  
      Returns
      -------
      members : `dict`
          Dictionary of
  
          - Keys: attribute name
          - Values: attribute
  
          The dictionary is ordered according to the attribute name.
  
      Notes
      -----
      This uses the insertion-order-preserved nature of `dict` in Python 3.6+.
  
      See also
      --------
      `inspect.getmembers`
      """
      fields = dict(inspect.getmembers(obj, predicate))
      keys = list(fields.keys())
      keys.sort()
      return {k: fields[k] for k in keys}