def get_url_entry_by_submit_type(submit_type, given_url, sample):
    """
        Args:
            submit_type (int) : SubmitType argument (can be one of those: 0,1,2,3)
            given_url (str) : a url if SubmitType arg is 2, None otherwise.
            sample (str) : a url (if SubmitType is 1 or 3 ) or a file entry id (if SubmitType is 0 or 2)

        Returns:
            url entry value (str)

    """
    if submit_type == 0:
        return ''
    elif submit_type == 2:
        return given_url
    else:
        return sample