def coll_range(coll_obj, field_name='_id'):
    """returns (minimum, maximum) value of a field

    :Parameters:
        - coll_obj: a pymongo collection object
        - field_name: (str) name of field (defaults to _id)
    :Example:
        >>> coll_range(db.muTest_tweets_users, 'id_str')
        (u'1004509039', u'999314042')
    """
    projection = {} if field_name == '_id' else {'_id': 0, field_name: 1}
    idMin = coll_obj.find_one(sort=[(field_name, 1)], projection=projection)
    if idMin:
        idMin = list(idMin.values())[0]
        idMax = coll_obj.find_one(sort=[(field_name, -1)], projection=
            projection)
        idMax = list(idMax.values())[0]
        return idMin, idMax
    else:
        return None, None
