def get_objects_name(objects):
    """ Retrieves the names of objects.

    Parameters:
        objects (list): Objects to get names.

    Returns:
        list: Object names.
    """
    names = []
    for object in objects:
        if object.name[-5:-3] == '}.':
            names.append(object.name[:-4])
        else:
            names.append(object.name)
    return names