parameters: (self, key)
return_statement: return None
docstring: Returns the first `Operation` from a collection.
  
      Args:
        key: A string collection key.
  
      Returns:
        The first Op found in a collection, or `None` if the collection is empty.
docstring_summary: Returns the first `Operation` from a collection.
docstring_tokens: Returns the first Operation from a collection .
function: def _get_first_op_from_collection(self, key):
      """Returns the first `Operation` from a collection.
  
      Args:
        key: A string collection key.
  
      Returns:
        The first Op found in a collection, or `None` if the collection is empty.
      """
      try:
        op_list = ops.get_collection(key)
        if len(op_list) > 1:
          logging.info("Found %d %s operations. Returning the first one.",
                       len(op_list), key)
        if op_list:
          return op_list[0]
      except LookupError:
        pass
  
      return None
function_tokens: def _get_first_op_from_collection ( self , key ) : try : op_list = ops . get_collection ( key ) if len ( op_list ) > 1 : logging . info ( "Found %d %s operations. Returning the first one." , len ( op_list ) , key ) if op_list : return op_list [ 0 ] except LookupError : pass return None