code: def zip_(*structures, **kwargs):
    # pylint: disable=differing-param-doc,missing-param-doc
    
    # Named keyword arguments are not allowed after *args in Python 2.
    flatten = kwargs.pop('flatten', False)
    assert not kwargs, 'zip() got unexpected keyword arguments.'
    return map(
        lambda *x: x if len(x) > 1 else x[0],
        *structures,
        flatten=flatten)
docs: Combine corresponding elements in multiple nested structure to tuples.
  
    The nested structures can consist of any combination of lists, tuples, and
    dicts. All provided structures must have the same nesting.
  
    Args:
      *structures: Nested structures.
      flatten: Whether to flatten the resulting structure into a tuple. Keys of
          dictionaries will be discarded.
  
    Returns:
      Nested structure.