def _get_id(param):
    """Returns a parameter ID.

    If param is a Parameter object, then we get the ID from it.
    Otherwise, we assume param is an integer.
    """
    try:
        # If this is a Parameter object, then return its _id attr.
        return param._id
    except AttributeError:
        # Otherwise, we assume it's an integer.
        return param