parameters: (self, encoder)
docstring: Encodes the object in a format compatible with Serializer.
docstring_summary: Encodes the object in a format compatible with Serializer.
docstring_tokens: Encodes the object in a format compatible with Serializer .
function: def encode(self, encoder):
      """Encodes the object in a format compatible with Serializer."""
      if self.isVariable():
        return {
            'type': 'ArgumentRef',
            'value': self.varName
        }
      else:
        # Encode the function that we're calling.
        func = encoder(self.func)
        # Built-in functions are encoded as strings under a different key.
        key = 'functionName' if isinstance(func, six.string_types) else 'function'
  
        # Encode all arguments recursively.
        encoded_args = {}
        for name, value in self.args.items():
          if value is not None:
            encoded_args[name] = encoder(value)
  
        return {
            'type': 'Invocation',
            'arguments': encoded_args,
            key: func
        }
function_tokens: def encode ( self , encoder ) : if self . isVariable ( ) : return { 'type' : 'ArgumentRef' , 'value' : self . varName } else : # Encode the function that we're calling. func = encoder ( self . func ) # Built-in functions are encoded as strings under a different key. key = 'functionName' if isinstance ( func , six . string_types ) else 'function' # Encode all arguments recursively. encoded_args = { } for name , value in self . args . items ( ) : if value is not None : encoded_args [ name ] = encoder ( value ) return { 'type' : 'Invocation' , 'arguments' : encoded_args , key : func }