def get_object_name(object):
    """ Retrieves the name of object.

    Parameters:
        object (obj): Object to get name.

    Returns:
        str: Object name.
    """
    if object.name[-5:-3] == '}.':
        return object.name[:-4]
    return object.name