'Get the credit mining policy.
:param as_class: whether to return a string or the python class
:return: the policy in string form or the policy class.'

def get_credit_mining_policy(self, as_class=False):

    policy_str = self.config['credit_mining']['policy']
    if as_class:
        switch_policy = {'random': RandomPolicy, 'creation': CreationDatePolicy, 'seederratio': SeederRatioPolicy}
        return switch_policy[policy_str]
    return policy_str
