src/dirbs/api/common/imei.py
def ever_observed_on_network(cursor, imei_norm: str) -> bool:
    """
    Method to check if an IMEI is ever observed on the network.

    Arguments:
        cursor: PostgreSQL connection cursor
        imei_norm: normalized IMEI
    Returns:
        Boolean: True/False
    """
    cursor.execute(
        """SELECT EXISTS(SELECT 1
                           FROM network_imeis
                          WHERE imei_norm = %(imei_norm)s
                            AND virt_imei_shard =
                                    calc_virt_imei_shard(%(imei_norm)s)) AS ever_observed_on_network""",  # noqa: Q449
        {'imei_norm': imei_norm})
    return cursor.fetchone().ever_observed_on_network

    Method to check if an IMEI is ever observed on the network.

    Arguments:
        cursor: PostgreSQL connection cursor
        imei_norm: normalized IMEI
    Returns:
        Boolean: True/False
    
Method to check if an IMEI is ever observed on the network.
Method to check if an IMEI is ever observed on the network .
def ever_observed_on_network(cursor, imei_norm: str) -> bool:
    cursor.execute(
        """SELECT EXISTS(SELECT 1
                           FROM network_imeis
                          WHERE imei_norm = %(imei_norm)s
                            AND virt_imei_shard =
                                    calc_virt_imei_shard(%(imei_norm)s)) AS ever_observed_on_network""",  
        {'imei_norm': imei_norm})
    return cursor.fetchone().ever_observed_on_network
def ever_observed_on_network ( cursor , imei_norm : str ) -> bool : cursor . execute ( """SELECT EXISTS(SELECT 1
                           FROM network_imeis
                          WHERE imei_norm = %(imei_norm)s
                            AND virt_imei_shard =
                                    calc_virt_imei_shard(%(imei_norm)s)) AS ever_observed_on_network""" , { 'imei_norm' : imei_norm } ) return cursor . fetchone ( ) . ever_observed_on_network
Method to check if an IMEI is ever observed on the network.
Method to check if an IMEI is ever observed on the network .
"""
    Method to check if an IMEI is ever observed on the network.

    Arguments:
        cursor: PostgreSQL connection cursor
        imei_norm: normalized IMEI
    Returns:
        Boolean: True/False
    """ # noqa: Q449
None
Boolean
cursor
PostgreSQL connection cursor
PostgreSQL connection cursor
imei_norm
str
None