<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _average_called_depth(in_file):
 """Retrieve the average depth of called reads in the provided VCF. """

    import cyvcf2
    depths = []
    for rec in cyvcf2.VCF(str(in_file)):
        d = rec.INFO.get("DP")
        if d is not None:
            depths.append(int(d))
    if len(depths) > 0:
        return int(math.ceil(numpy.mean(depths)))
    else:
        return 0