<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def distancemodulus(d):
 """Returns distance modulus given d in parsec. """

    if type(d)==Quantity:
        x = d.to('pc').value
    else:
        x = d #assumed to be pc

    if np.size(x)>1:
        d = np.atleast_1d(x)
    return 5*np.log10(x/10)