Make function generic and add dosctrings
Make function generic and add dosctrings

sorgerlab/belpy,sorgerlab/belpy,bgyori/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,johnbachman/belpy,bgyori/indra,johnbachman/indra