def METHOD_NAME(type_name):
    """Returns the key from type_name.
    Args:
        type_name (str): Type name.
    Returns:
        str: Resource id.
    """
    if '/' in type_name:
        return type_name.split('/')[-1]
    return type_name