parameters: (repl, use_format=False)
docstring: Check if replace template is expandable.
docstring_summary: Check if replace template is expandable.
docstring_tokens: Check if replace template is expandable .
function: def _assert_expandable(repl, use_format=False):
      """Check if replace template is expandable."""
  
      if isinstance(repl, ReplaceTemplate):
          if repl.use_format != use_format:
              if use_format:
                  raise ValueError("Replace not compiled as a format replace")
              else:
                  raise ValueError("Replace should not be compiled as a format replace!")
      elif not isinstance(repl, (_util.string_type, _util.binary_type)):
          raise TypeError("Expected string, buffer, or compiled replace!")
function_tokens: def _assert_expandable ( repl , use_format = False ) : if isinstance ( repl , ReplaceTemplate ) : if repl . use_format != use_format : if use_format : raise ValueError ( "Replace not compiled as a format replace" ) else : raise ValueError ( "Replace should not be compiled as a format replace!" ) elif not isinstance ( repl , ( _util . string_type , _util . binary_type ) ) : raise TypeError ( "Expected string, buffer, or compiled replace!" )