def METHOD_NAME(account: int, metric_type: Text, start_date: date = None, end_date: date = None, **kwargs):
    """
    Retrieves custom metrics for a particular bot in a paginated fashion.
    :param account: account
    :param metric_type: metric_type
    :param start_date: start date
    :param end_date: end date
    :return: all the metrics as json.
    """
    if not start_date:
        start_date = datetime.utcnow().replace(day=1, hour=0, minute=0, second=0, microsecond=0)
    if not end_date:
        month = datetime.utcnow().date().month
        year = datetime.utcnow().date().year
        end_date = datetime.utcnow().replace(day=calendar.monthrange(year, month)[1])
    kwargs.update({"account": account, "metric_type": metric_type, "timestamp__gte": start_date,
                   "timestamp__lte": end_date})
    metric_count = Metering.objects(**kwargs).count()
    return metric_count