class_docstr: Specification of how to bind arguments to a function.
  
  Deprecated. Please use FunctionType instead.
class_docstr_tok: ["Specification","of","how","to","bind","arguments","to","a","function",".","Deprecated",".","Please","use","FunctionType","instead","."]
docstr: Creates a FunctionSpec instance given a python function and signature.
  
  Args:
    python_function: a function to inspect
    input_signature: a signature of the function (None, if variable)
    is_pure: if True all input arguments (including variables and constants)
      will be converted to tensors and no variable changes allowed.
    jit_compile: see `tf.function`
  
  Returns:
    instance of FunctionSpec
docstr_tok: ["Creates","a","FunctionSpec","instance","given","a","python","function","and","signature",".","Args",":","python_function",":","a","function","to","inspect","input_signature",":","a","signature","of","the","function","(","None",",","if","variable",")","is_pure",":","if","True","all","input","arguments","(","including","variables","and","constants",")","will","be","converted","to","tensors","and","no","variable","changes","allowed",".","jit_compile",":","see","`","tf.function","`","Returns",":","instance","of","FunctionSpec"]
code: def from_function_and_signature(
      cls,
      python_function,
      input_signature,
      is_pure=False,
      jit_compile=None,
  ):
      """Creates a FunctionSpec instance given a python function and signature.
  
      Args:
        python_function: a function to inspect
        input_signature: a signature of the function (None, if variable)
        is_pure: if True all input arguments (including variables and constants)
          will be converted to tensors and no variable changes allowed.
        jit_compile: see `tf.function`
  
      Returns:
        instance of FunctionSpec
      """
      function_type, default_values = make_function_type(
          python_function, input_signature
      )
      # Get the function's name.  Remove functools.partial wrappers if necessary.
      while isinstance(python_function, functools.partial):
          python_function = python_function.func
      name = getattr(python_function, "__name__", "f")
  
      return FunctionSpec(
          function_type,
          default_values,
          is_pure=is_pure,
          jit_compile=jit_compile,
          name=name,
      )
  
imports: import functools
  import inspect
  from typing import Any, Dict, Tuple
  import six
  from tensorflow.core.function import trace_type
  from tensorflow.core.function.polymorphism import function_type
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 for calling the FunctionSpec obj's underlying member method code with example usage: obj.from_function_and_signature(cls, python_function, input_signature, is_pure, jit_compile) and returns: FunctionSpec