correct classmethod and cls

Change-Id: Icc7e24db810ed94912e26b1692542e76a38a66a3
pylint: W0202: Class method should have 'cls' as first argument

Change-Id: I8dc8c73bd151e975c58016172a26f67cd21480f8
pylint: W0602: Using global without assignment

Change-Id: Ie4105e74da530e422bb42d5bb1e65697a9b9ab6b