parameters: (m, repl=None)
docstring: Expand with either the ReplaceTemplate or the user function, compile on the fly, or return None.
docstring_summary: Expand with either the ReplaceTemplate or the user function, compile on the fly, or return None.
docstring_tokens: Expand with either the ReplaceTemplate or the user function compile on the fly or return None .
function: def _apply_replace_backrefs(m, repl=None):
      """Expand with either the ReplaceTemplate or the user function, compile on the fly, or return None."""
  
      if repl is not None and m is not None:
          if hasattr(repl, '__call__'):
              return repl(m)
          elif isinstance(repl, ReplaceTemplate):
              return ReplaceTemplateExpander(m, repl).expand()
          elif isinstance(repl, (compat.string_type, compat.binary_type)):
              return ReplaceTemplateExpander(m, ReplaceTemplate(m.re, repl)).expand()
function_tokens: def _apply_replace_backrefs ( m , repl = None ) : if repl is not None and m is not None : if hasattr ( repl , '__call__' ) : return repl ( m ) elif isinstance ( repl , ReplaceTemplate ) : return ReplaceTemplateExpander ( m , repl ) . expand ( ) elif isinstance ( repl , ( compat . string_type , compat . binary_type ) ) : return ReplaceTemplateExpander ( m , ReplaceTemplate ( m . re , repl ) ) . expand ( )