parameters: (instance, args)
docstring: Converts the sequence `args` to the same type as `instance`.
  
    Args:
      instance: an instance of `tuple`, `list`, or a `namedtuple` class.
      args: elements to be converted to a sequence.
  
    Returns:
      `args` with the type of `instance`.
docstring_summary: Converts the sequence `args` to the same type as `instance`.
docstring_tokens: Converts the sequence args to the same type as instance .
function: def _sequence_like(instance, args):
    """Converts the sequence `args` to the same type as `instance`.
  
    Args:
      instance: an instance of `tuple`, `list`, or a `namedtuple` class.
      args: elements to be converted to a sequence.
  
    Returns:
      `args` with the type of `instance`.
    """
    if (isinstance(instance, tuple) and
        hasattr(instance, "_fields") and
        isinstance(instance._fields, collections.Sequence) and
        all(isinstance(f, six.string_types) for f in instance._fields)):
      # This is a namedtuple
      return type(instance)(*args)
    else:
      # Not a namedtuple
      return type(instance)(args)
function_tokens: def _sequence_like ( instance , args ) : if ( isinstance ( instance , tuple ) and hasattr ( instance , "_fields" ) and isinstance ( instance . _fields , collections . Sequence ) and all ( isinstance ( f , six . string_types ) for f in instance . _fields ) ) : # This is a namedtuple return type ( instance ) ( * args ) else : # Not a namedtuple return type ( instance ) ( args )