@staticmethod
def _build_scan_args(cursor, pattern, count):
    """
        Construct arguments list for SCAN, SSCAN, HSCAN, ZSCAN commands
        """
    args = [cursor]
    if pattern is not None:
        args.extend(('MATCH', pattern))
    if count is not None:
        args.extend(('COUNT', count))
    return args
