import six


def get_markings(obj):
    """
    Get all object level markings from the given TLO object.

    Args:
        obj: A TLO object.

    Returns:
        list: Marking IDs contained in the TLO.

    """
    object_markings = obj.get("object_marking_refs", [])

    if not object_markings:
        return []
    elif isinstance(object_markings, (six.text_type, six.binary_type)):
        return [object_markings]
    else:
        return object_markings