def METHOD_NAME(project_name, asset_doc=None, asset_id=None):
    """Extract linked asset ids from asset document.
    One of asset document or asset id must be passed.
    Note:
        Asset links now works only from asset to assets.
    Args:
        project_name (str): Project where to look for asset.
        asset_doc (dict): Asset document from DB.
        asset_id (str): Asset id to find its document.
    Returns:
        List[Union[ObjectId, str]]: Asset ids of input links.
    """
    output = []
    if not asset_doc and not asset_id:
        return output
    if not asset_id:
        asset_id = asset_doc["_id"]
    links = get_folder_links(project_name, asset_id, link_direction="in")
    return [
        link["entityId"]
        for link in links
        if link["entityType"] == "folder"
    ]