def get_object(o,
               names
               ):
    """
    Command used to get the object o.name1.name2.name3 where name1, name2, name3 are provided in `names`
    It is located here so that it can be pickled and sent over the wire

    :param o:
    :param names:
    :return:
    """
    result = o
    for n in names:
        result = getattr(result, n)
    return result