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:
        asset_doc (dict): Asset document from DB.
    Returns:
        List[Union[ObjectId, str]]: Asset ids of input links.
    """
    output = []
    if not asset_doc and not asset_id:
        return output
    if not asset_doc:
        asset_doc = get_asset_by_id(
            project_name, asset_id, fields=["data.inputLinks"]
        )
    input_links = asset_doc["data"].get("inputLinks")
    if not input_links:
        return output
    for item in input_links:
        # Backwards compatibility for "_id" key which was replaced with
        #   "id"
        if "_id" in item:
            link_id = item["_id"]
        else:
            link_id = item["id"]
        output.append(link_id)
    return output