def s3_get_bucket_versioning(s3_obj, bucketname, s3_client=None):
    """
    Boto3 client based Get Bucket Versioning function

    Args:
        s3_obj (obj): MCG or OBC object
        bucketname (str): Name of the bucket
        s3_client: Any s3 client resource

    Returns:
        dict : GetBucketVersioning response
    """
    if s3_client:
        return s3_client.get_bucket_versioning(Bucket=bucketname)
    else:
        return s3_obj.s3_client.get_bucket_versioning(Bucket=bucketname)