Seems like this is replicating the code in line 65, do you think it might make sense to have an argument to decide which type of metadata it is that you want to retrieve?