def get_sim_name(obj):
    """
    Get an in-simulation object name: if ``obj`` has attribute
    ``__sim_name__``, it will be returned, otherwise ``__name__``
    standard attribute.

    Args:
        obj: an object to get name of

    Returns: object name
    """
    if hasattr(obj, '__sim_name__') and obj.__sim_name__ is not None:
        return obj.__sim_name__
    else:
        return obj.__name__