def _copy_docstring(original_fn, new_fn):
original_spec = tf_inspect.getfullargspec(original_fn)<EOL>new_spec = tf_inspect.getfullargspec(new_fn)<EOL>if original_spec != new_spec:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'.format(<EOL>original_spec, new_spec, original_fn))<EOL><DEDENT>@decorator.decorator<EOL>def wrap(wrapped_fn, *args, **kwargs):<EOL><INDENT>del wrapped_fn<EOL>return new_fn(*args, **kwargs)<EOL><DEDENT>return wrap(original_fn)<EOL>
Wraps new_fn with the doc of original_fn.