code: def rule_expand(component, text):
      '''expand one rule component'''
      global rline_mpstate
      if component[0] == '<' and component[-1] == '>':
          return component[1:-1].split('|')
      if component in rline_mpstate.completion_functions:
          return rline_mpstate.completion_functions[component](text)
      return [componentf rule_expand(component, text):
      '''expand one rule component'''
      global rline_mpstate
      if component[0] == '<' and component[-1] == '>':
          return component[1:-1].split('|')
      if component in rline_mpstate.completion_functions:
          return rline_mpstate.completion_functions[component](text)
      return [component]
docs: expand one rule component