code: def get_network_resource_property_entry(resource, prop):
      
  
      def get_func(cmd, resource_group_name, resource_name, item_name):
          client = getattr(network_client_factory(cmd.cli_ctx), resource)
          items = getattr(client.get(resource_group_name, resource_name), prop)
  
          result = next((x for x in items if x.name.lower() == item_name.lower()), None)
          if not result:
              raise CLIError("Item '{}' does not exist on {} '{}'".format(
                  item_name, resource, resource_name))
          else:
              return result
  
      func_name = 'get_network_resource_property_entry_{}_{}'.format(resource, prop)
      setattr(sys.modules[__name__], func_name, get_func)
      return func_name
docs: Factory method for creating get functions.