parameters: (value)
return_statement: return OrderedDict(value)
docstring: Take an object and test to see if it can be represented as a
      dictionary. Unless it can not be represented as such, return an
      OrderedDict, e.g.,
  
      ::
  
          >>> from_key_val_list([('key', 'val')])
          OrderedDict([('key', 'val')])
          >>> from_key_val_list('string')
          ValueError: cannot encode objects that are not 2-tuples
          >>> from_key_val_list({'key': 'val'})
          OrderedDict([('key', 'val')])
  
      :rtype: OrderedDict
docstring_summary: Take an object and test to see if it can be represented as a
      dictionary. Unless it can not be represented as such, return an
      OrderedDict, e.g.,
docstring_tokens: Take an object and test to see if it can be represented as a dictionary . Unless it can not be represented as such return an OrderedDict e . g .
function: def from_key_val_list(value):
      """Take an object and test to see if it can be represented as a
      dictionary. Unless it can not be represented as such, return an
      OrderedDict, e.g.,
  
      ::
  
          >>> from_key_val_list([('key', 'val')])
          OrderedDict([('key', 'val')])
          >>> from_key_val_list('string')
          ValueError: cannot encode objects that are not 2-tuples
          >>> from_key_val_list({'key': 'val'})
          OrderedDict([('key', 'val')])
  
      :rtype: OrderedDict
      """
      if value is None:
          return None
  
      if isinstance(value, (str, bytes, bool, int)):
          raise ValueError('cannot encode objects that are not 2-tuples')
  
      return OrderedDict(value)
function_tokens: def from_key_val_list ( value ) : if value is None : return None if isinstance ( value , ( str , bytes , bool , int ) ) : raise ValueError ( 'cannot encode objects that are not 2-tuples' ) return OrderedDict ( value )