def METHOD_NAME(self, link_type, input_id, version_doc):
    """Add dependency link data into version document
    Args:
        link_type (str): Type of link, one of 'reference' or 'generative'
        input_id (str or ObjectId): Document Id of input version
        version_doc (dict): The version document that takes the input
    Returns:
        None
    """
    # NOTE:
    # using OrderedDict() here is just for ensuring field order between
    # python versions, if we ever need to use mongodb operation '$addToSet'
    # to update and avoid duplicating elements in 'inputLinks' array in the
    # future.
    link = OrderedDict()
    link["type"] = link_type
    link["id"] = ObjectId(input_id)
    link["linkedBy"] = "publish"
    if "inputLinks" not in version_doc["data"]:
        version_doc["data"]["inputLinks"] = []
    version_doc["data"]["inputLinks"].append(link)